Some additional idiot-proofing.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2010-03-19 10:01:02 -07:00
parent a71f5df64f
commit b22b279bd1
2 changed files with 10 additions and 0 deletions

View File

@ -274,6 +274,14 @@ 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);
last BLACKLIST;
}
} 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);
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 ' : '';

View File

@ -33,6 +33,8 @@ Changes in Shorewall 4.4.8
16) Distinguish between 'Started' and 'Restored' in ${VARDIR}/state 16) Distinguish between 'Started' and 'Restored' in ${VARDIR}/state
17) Issue warnings when 'blacklist' but no blacklist file entries.
Changes in Shorewall 4.4.7 Changes in Shorewall 4.4.7
1) Backport optimization changes from 4.5. 1) Backport optimization changes from 4.5.