From ed352f60b69a1f5beef3034beeb35683dbd2ae8c Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 25 May 2012 15:41:55 -0700 Subject: [PATCH] Complete removal of optimize level 4 when level 4 is set. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Rules.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index a4d8a554c..869685b93 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -1688,7 +1688,7 @@ sub process_rule1 ( $$$$$$$$$$$$$$$$$ ) { my ( $action, $loglevel) = split_action $target; my ( $basictarget, $param ) = get_target_param $action; my $rule = ''; - my $optimize = $wildcard ? ( $basictarget =~ /!$/ ? 0 : $config{OPTIMIZE} & 1 ) : 0; + my $optimize = $wildcard ? ( $basictarget =~ /!$/ ? 0 : $config{OPTIMIZE} & 5 ) : 0; my $inaction = ''; my $normalized_target; my $normalized_action; @@ -1953,7 +1953,7 @@ sub process_rule1 ( $$$$$$$$$$$$$$$$$ ) { # # Handle Optimization # - if ( $optimize > 0 && $section eq 'NEW' ) { + if ( $optimize == 1 && $section eq 'NEW' ) { my $loglevel = $filter_table->{$chainref->{policychain}}{loglevel}; if ( $loglevel ne '' ) { return 0 if $target eq "${policy}:$loglevel}";