From e93ecfd0e60cdc1e1ff53c172ad554784cc63012 Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 28 Mar 2007 14:20:46 +0000 Subject: [PATCH] Make ADMINISABSENTMINDED logic clearer git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5722 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- New/compiler.pl | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/New/compiler.pl b/New/compiler.pl index 4dcdefaa4..a2e74e0ae 100755 --- a/New/compiler.pl +++ b/New/compiler.pl @@ -397,27 +397,27 @@ stop_firewall() { "done\n" ); } - } elsif ( ! $config{ADMINISABSENTMINDED} ) { + } elsif ( $config{ADMINISABSENTMINDED} ) { + emitj( 'for chain in INPUT FORWARD; do', + ' setpolicy $chain DROP', + 'done', + '', + 'setpolicy OUTPUT ACCEPT', + '', + 'deleteallchains', + '', + 'for chain in INPUT FORWARD; do', + ' setcontinue $chain', + "done\n", + ); + } else { emitj( 'for chain in INPUT OUTPUT FORWARD; do', ' setpolicy $chain DROP', 'done', '', "deleteallchains\n" ); - } else { - emitj( 'for chain in INPUT FORWARD; do', - ' setpolicy $chain DROP', - 'done', - '', - 'setpolicy OUTPUT ACCEPT', - '', - 'deleteallchains', - '', - 'for chain in INPUT FORWARD; do', - ' setcontinue $chain', - "done\n", - ); - } + } process_routestopped;