diff --git a/Shorewall-perl/Shorewall/Actions.pm b/Shorewall-perl/Shorewall/Actions.pm index 5687ce8a0..ce898ae0d 100644 --- a/Shorewall-perl/Shorewall/Actions.pm +++ b/Shorewall-perl/Shorewall/Actions.pm @@ -35,7 +35,6 @@ our @ISA = qw(Exporter); our @EXPORT = qw( merge_levels isolate_basic_target add_requiredby - createlogactionchain createactionchain find_logactionchain process_actions1 @@ -260,6 +259,10 @@ sub createlogactionchain( $$ ) { my $chain = $action; my $actionref = $actions{$action}; my $chainref; + + my ($lev, $tag) = split ':', $level; + + validate_level $lev; $chain = substr $chain, 0, 28 if ( length $chain ) > 28; @@ -269,8 +272,6 @@ sub createlogactionchain( $$ ) { $actionref = new_action $action unless $actionref; - $level = 'none' unless $level; - $logactionchains{"$action:$level"} = $chainref = new_chain 'filter', '%' . $chain . $actionref->{actchain}++; mark_referenced $chainref; # Just in case the action body is empty. diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index f7485ecd4..8d647ee2a 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -1274,7 +1274,7 @@ sub log_rule_limit( $$$$$$$$ ) { my $prefix; - $level = validate_level $level; + $level = validate_level $level; # Do this here again because this function can be called directly from user exits. return 1 if $level eq '';