aboutsummaryrefslogtreecommitdiffstats
path: root/package/firewall/files/reflection.hotplug
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-09-04 17:49:14 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-09-04 17:49:14 +0000
commitf4ee14e1c3fcca9d5abf3f7c00855b645fb2d4ab (patch)
tree9d6714ddaa6a7f3529590fc0b25074bcb50a73e7 /package/firewall/files/reflection.hotplug
parentbaf4782be6f7bd52a5d8c51c66778da195e18455 (diff)
downloadupstream-f4ee14e1c3fcca9d5abf3f7c00855b645fb2d4ab.tar.gz
upstream-f4ee14e1c3fcca9d5abf3f7c00855b645fb2d4ab.tar.bz2
upstream-f4ee14e1c3fcca9d5abf3f7c00855b645fb2d4ab.zip
firewall: add option to disable NAT reflection
SVN-Revision: 22908
Diffstat (limited to 'package/firewall/files/reflection.hotplug')
-rw-r--r--package/firewall/files/reflection.hotplug4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/firewall/files/reflection.hotplug b/package/firewall/files/reflection.hotplug
index dc6780a720..6b1cd60f28 100644
--- a/package/firewall/files/reflection.hotplug
+++ b/package/firewall/files/reflection.hotplug
@@ -53,6 +53,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