From 628120e440d93287d110c03542d066046caa73a0 Mon Sep 17 00:00:00 2001 From: teastep Date: Thu, 9 Dec 2004 03:14:41 +0000 Subject: [PATCH] Corrections to ipsec and dynamic zones git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1813 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall2/firewall | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Shorewall2/firewall b/Shorewall2/firewall index aa7b0fe5c..4b6255206 100755 --- a/Shorewall2/firewall +++ b/Shorewall2/firewall @@ -6960,11 +6960,7 @@ delete_from_zone() # $1 = [:] $2 = zone hosts=${h#*:} if [ "$iface" != "$interface" -o "$hosts" != "$host" ]; then - if is_ipsec_host $z1 $h; then - do_iptables -D ${z1}_frwd $(match_source_hosts $hosts) -o $interface $(match_dest_hosts $host) $(match_ipsec_out $z2 $newhost) -j $chain - else - qt_iptables -D $source_chain $(match_source_hosts $host) -o $iface $(match_dest_hosts $hosts) $(match_ipsec_out $z2 $h) -j $chain - fi + qt_iptables -D $source_chain $(match_source_hosts $host) -o $iface $(match_dest_hosts $hosts) $(match_ipsec_out $z2 $h) -j $chain fi done fi @@ -6980,7 +6976,11 @@ delete_from_zone() # $1 = [:] $2 = zone hosts=${h#*:} if [ "$iface" != "$interface" -o "$hosts" != "$host" ]; then - qt_iptables -D $(dynamic_fwd $iface) $(match_source_hosts $hosts) -o $interface $(match_dest_hosts $host) $(match_ipsec_out $z2 $delhost) -j $chain + if is_ipsec_host $z1 $h; then + do_iptables -D ${z1}_frwd $(match_source_hosts $hosts) -o $interface $(match_dest_hosts $host) $(match_ipsec_out $z2 $newhost) -j $chain + else + qt_iptables -D $(dynamic_fwd $iface) $(match_source_hosts $hosts) -o $interface $(match_dest_hosts $host) $(match_ipsec_out $z2 $delhost) -j $chain + fi fi done fi