From e2c84a21bee7b3333bf38adcfd0507bf6628e93f Mon Sep 17 00:00:00 2001 From: teastep Date: Thu, 19 Oct 2006 15:13:58 +0000 Subject: [PATCH] Give '2all' exclusion chains short names; fix bug git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4706 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/compiler | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Shorewall/compiler b/Shorewall/compiler index ae9a822bb..842419d12 100755 --- a/Shorewall/compiler +++ b/Shorewall/compiler @@ -4298,13 +4298,18 @@ activate_rules() fi ;; *2all) - chain1=${chain}_${zone1}_ex - if ! havechain $chain1; then + eval chain1=\$${chain}_${zone1}_ex + + if [ -z "$chain1" ]; then + chain1=excl_${EXCLUSION_SEQ} + EXCLUSION_SEQ=$(( $EXCLUSION_SEQ + 1 )) + eval ${chain}_${zone}_ex=$chain1 createchain $chain1 no insert_exclusions filter $chain1 $exclusions1 run_iptables -A $chain1 -j $chain - chain=$chain1 fi + + chain=$chain1 ;; *) insert_exclusions filter $chain $exclusions1