diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index daef3678e..b215c9e44 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -274,6 +274,14 @@ sub setup_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 ' : ''; diff --git a/Shorewall/changelog.txt b/Shorewall/changelog.txt index 9afb7d754..c2a373ea3 100644 --- a/Shorewall/changelog.txt +++ b/Shorewall/changelog.txt @@ -33,6 +33,8 @@ Changes in Shorewall 4.4.8 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 1) Backport optimization changes from 4.5.