From 4690075ed8f998c3c36469312e8f5fcfa06ae49e Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 18 May 2010 20:29:03 -0700 Subject: [PATCH] Start firewall on up event for optional interface. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Zones.pm | 4 ++++ Shorewall/releasenotes.txt | 14 ++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Zones.pm b/Shorewall/Perl/Shorewall/Zones.pm index 72d289c42..b1274a1b0 100644 --- a/Shorewall/Perl/Shorewall/Zones.pm +++ b/Shorewall/Perl/Shorewall/Zones.pm @@ -1333,6 +1333,10 @@ sub compile_updown() { ' COMMAND=restart', ' detect_configuration', ' define_firewall', + ' elif [ "$state" = stopped ]; then', + ' COMMAND=start', + ' detect_configuration', + ' define_firewall', ' fi', ' ;;', ); diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index ce8a41736..addfc12d9 100644 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -318,10 +318,11 @@ None. The following actions occur when an interface comes up: FIREWALL INTERFACE ACTION - STATE REQUIRED? + STATE ---------------------------------- - Any Yes start - started No restart + Any Required start + stopped Optional start + started - restart The following actions occur when an interface goes down: @@ -329,10 +330,11 @@ None. optional FIREWALL INTERFACE ACTION - STATE REQUIRED? + STATE ---------------------------------- - Any Yes stop - started No restart + Any Required stop + stopped Optional start + started - restart For optional interfaces, the /var/lib//.state files are maintained to reflect the state of the interface.