[backfire] firewall: backport r23141, r23142 and r23143
[openwrt-10.03/.git] / package / firewall / files / reflection.hotplug
index 76ef6e7a99ffbe8dcd4cc28d62d593610755eef9..e5194af7df8b76e4871e6e04d8cad9d2bd9920ca 100644 (file)
@@ -34,7 +34,7 @@ if [ "$ACTION" = "add" ] && [ "$INTERFACE" = "wan" ]; then
 
                config_foreach find_networks_cb zone "$1"
        }
-       
+
        setup_fwd() {
                local cfg="$1"
 
@@ -82,6 +82,9 @@ if [ "$ACTION" = "add" ] && [ "$INTERFACE" = "wan" ]; then
 
                                [ "$proto" = tcpudp ] && proto="tcp udp"
 
+                               [ "${inthost#!}" = "$inthost" ] || return 0
+                               [ "${exthost#!}" = "$exthost" ] || return 0
+
                                local p
                                for p in ${proto:-tcp udp}; do
                                        case "$p" in