Back off on not jumping to the blacklist chain when there are no blacklist entries.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2010-03-19 11:32:22 -07:00
parent fae29bcf6f
commit 9a88156769

View File

@ -275,13 +275,9 @@ sub setup_blacklist() {
progress_message " \"$currentline\" added to blacklist"; progress_message " \"$currentline\" added to blacklist";
} }
if ( $first_entry && @$hosts ) { warning_message q(There are interfaces or hosts with the 'blacklist' option but the 'blacklist' file is empty) if $first_entry && @$hosts;
warning_message q(There are interfaces or hosts with the 'blacklist' option but the 'blacklist' file is empty);
last BLACKLIST;
}
} elsif ( @$hosts ) { } elsif ( @$hosts ) {
warning_message q(There are interfaces or hosts with the 'blacklist' option, but the 'blacklist' file is either missing or has zero size); warning_message q(There are interfaces or hosts with the 'blacklist' option, but the 'blacklist' file is either missing or has zero size);
last BLACKLIST;
} }
my $state = $config{BLACKLISTNEWONLY} ? $globals{UNTRACKED} ? '-m state --state NEW,INVALID,UNTRACKED ' : '-m state --state NEW,INVALID ' : ''; my $state = $config{BLACKLISTNEWONLY} ? $globals{UNTRACKED} ? '-m state --state NEW,INVALID,UNTRACKED ' : '-m state --state NEW,INVALID ' : '';