From f849dfe6bad96403e4a330ddb9047f10585540c5 Mon Sep 17 00:00:00 2001 From: teastep Date: Mon, 29 Nov 2004 19:29:33 +0000 Subject: [PATCH] More fixes for 'shorewall delete' and bridging git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1787 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall2/changelog.txt | 1 + Shorewall2/firewall | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Shorewall2/changelog.txt b/Shorewall2/changelog.txt index e60d1df09..eedfc1d7d 100644 --- a/Shorewall2/changelog.txt +++ b/Shorewall2/changelog.txt @@ -161,3 +161,4 @@ Changes since 2.0.3 78) Implement variable expansion in INCLUDE directives +79) More fixes for "shorewall delete" with bridging. diff --git a/Shorewall2/firewall b/Shorewall2/firewall index 1a7677ee7..1ac9e5ca5 100755 --- a/Shorewall2/firewall +++ b/Shorewall2/firewall @@ -6898,14 +6898,14 @@ delete_from_zone() # $1 = [:] $2 = zone # # Delete any nat table entries for the host(s) # - qt_iptables -t nat -D $(dynamic_in $interface) $(source_ip_range $host) $policyin -j ${zone}_dnat + qt_iptables -t nat -D $(dynamic_in $interface) $(match_source_hosts $host) $policyin -j ${zone}_dnat # # Delete rules rules the input chains for the passed interface # while read z1 z2 chain; do if [ "$z1" = "$zone" ]; then if [ "$z2" = "$FW" ]; then - qt_iptables -D $(dynamic_in $interface) $(source_ip_range $host) $policyin -j $chain + qt_iptables -D $(dynamic_in $interface) $(match_source_hosts $host) $policyin -j $chain else source_chain=$(dynamic_fwd $interface) eval dest_hosts=\"\$${z2}_hosts\" @@ -6915,13 +6915,13 @@ delete_from_zone() # $1 = [:] $2 = zone hosts=${h#*:} if [ "$iface" != "$interface" -o "$hosts" != "$host" ]; then - qt_iptables -D $source_chain $(source_ip_range $host) -o $iface $(match_dest_hosts $hosts) $policyout -j $chain + qt_iptables -D $source_chain $(match_source_hosts $host) -o $iface $(match_dest_hosts $hosts) $policyout -j $chain fi done fi elif [ "$z2" = "$zone" ]; then if [ "$z1" = "$FW" ]; then - qt_iptables -D $(dynamic_out $interface) $(dest_ip_range $host) $policyout -j $chain + qt_iptables -D $(dynamic_out $interface) $(match_dest_hosts $host) $policyout -j $chain else eval source_hosts=\"\$${z1}_hosts\" @@ -6930,7 +6930,7 @@ 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 $(dest_ip_range $host) $policyout -j $chain + qt_iptables -D $(dynamic_fwd $iface) $(match_source_hosts $hosts) -o $interface $(match_dest_hosts $host) $policyout -j $chain fi done fi