[package] firewall: make invalid redirects and duplicate zones non-fatal, print a...
[openwrt.git] / package / firewall / files / reflection.hotplug
index dc6780a..027d2ed 100644 (file)
@@ -41,7 +41,10 @@ if [ "$ACTION" = "add" ] && [ "$INTERFACE" = "wan" ]; then
                local src
                config_get src "$cfg" src
 
-               [ "$src" = wan ] && {
+               local target
+               config_get target "$cfg" target DNAT
+
+               [ "$src" = wan ] && [ "$target" = DNAT ] && {
                        local dest
                        config_get dest "$cfg" dest "lan"
 
@@ -53,6 +56,10 @@ if [ "$ACTION" = "add" ] && [ "$INTERFACE" = "wan" ]; then
                                local proto
                                config_get proto "$cfg" proto
 
+                               local reflection
+                               config_get_bool reflection "$cfg" reflection 1
+                               [ "$reflection" == 1 ] || return
+
                                local epmin epmax extport
                                config_get extport "$cfg" src_dport
                                [ -n "$extport" ] || return
This page took 0.02385 seconds and 4 git commands to generate.