From 3a67b4f76c74275563dc7cc97d8b6a69ecdc9bcf Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 25 Apr 2007 00:11:02 +0000 Subject: [PATCH] Fix more log level bugs git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6112 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Rules.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Shorewall-perl/Shorewall/Rules.pm b/Shorewall-perl/Shorewall/Rules.pm index ef97aa7a0..3081d720a 100644 --- a/Shorewall-perl/Shorewall/Rules.pm +++ b/Shorewall-perl/Shorewall/Rules.pm @@ -1171,7 +1171,7 @@ sub process_rule ( $$$$$$$$$ ) { if ( ( ( my $policy ) = $policychainref->{policy} ) ne 'NONE' ) { if ( $optimize > 0 ) { my $loglevel = $policychainref->{loglevel}; - if ( $loglevel ne '' ) { + if ( defined $loglevel && $loglevel ne '' ) { next if $target eq "${policy}:$loglevel}"; } else { next if $action eq $policy; @@ -1191,7 +1191,7 @@ sub process_rule ( $$$$$$$$$ ) { if ( ( ( my $policy ) = $policychainref->{policy} ) ne 'NONE' ) { if ( $optimize > 0 ) { my $loglevel = $policychainref->{loglevel}; - if ( $loglevel ne '') { + if ( defined $loglevel && $loglevel ne '') { next if $target eq "${policy}:$loglevel}"; } else { next if $action eq $policy; @@ -1212,7 +1212,7 @@ sub process_rule ( $$$$$$$$$ ) { if ( ( ( my $policy ) = $policychainref->{policy} ) ne 'NONE' ) { if ( $optimize > 0 ) { my $loglevel = $policychainref->{loglevel}; - if ( $loglevel ne '' ) { + if ( defined $loglevel && $loglevel ne '' ) { next if $target eq "${policy}:$loglevel}"; } else { next if $action eq $policy;