From 46cffe3dd3394043b7ddf11b1af724cebed8ba07 Mon Sep 17 00:00:00 2001 From: teastep Date: Sat, 30 Dec 2006 17:30:53 +0000 Subject: [PATCH] Fix for empty blacklist file git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5171 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/changelog.txt | 4 ++++ Shorewall/compiler | 11 ++++++++--- Shorewall/releasenotes.txt | 7 +++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Shorewall/changelog.txt b/Shorewall/changelog.txt index 12f0d4a14..799af68be 100644 --- a/Shorewall/changelog.txt +++ b/Shorewall/changelog.txt @@ -1,3 +1,7 @@ +Changes in 3.4.0 Beta 2 + +1) Fix for empty blacklist file. + Changes in 3.4.0 Beta 1 1) Correct handling of masq file. diff --git a/Shorewall/compiler b/Shorewall/compiler index 331dce0b8..5b0eadc12 100755 --- a/Shorewall/compiler +++ b/Shorewall/compiler @@ -3300,9 +3300,14 @@ load_blacklist() __EOF__ INDENT=" " - while read networks protocol ports; do - process_blacklist_rec - done < $TMP_DIR/blacklist + if [ -s $TMP_DIR/blacklist ]; then + + while read networks protocol ports; do + process_blacklist_rec + done < $TMP_DIR/blacklist + else + save_command true + fi INDENT= save_command "}" diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index 3d78e33b5..6d81b56ed 100644 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -28,6 +28,13 @@ Release Highlights /etc/shorewall/route_rules and reverses those changes when appropriate. +Problems Corrected in 3.4.0 Beta 2 + +1) If 'blacklist' was specified on an interface and the + /etc/shorewall/blacklist was empty, then the generated firewall + script contained a syntax error (the function load_blacklist() was + empty). + Migration Considerations: 1) Shorewall supports the notion of "default actions". A default