summaryrefslogtreecommitdiffstats
path: root/package/firewall/files/reflection.hotplug
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-07-09 12:23:36 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-07-09 12:23:36 +0000
commit45960666c5c92f9133007a85ab35e01f3667c8b3 (patch)
tree8fcc29a90f55007104c2fefdde09e79c0151640c /package/firewall/files/reflection.hotplug
parent84032b177b6535804ac879c6b52a1775cdd8edc3 (diff)
[package] firewall: also set up nat reflection rules for redirects with proto all and/or no src_dport set
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32652 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/firewall/files/reflection.hotplug')
-rw-r--r--package/firewall/files/reflection.hotplug3
1 files changed, 2 insertions, 1 deletions
diff --git a/package/firewall/files/reflection.hotplug b/package/firewall/files/reflection.hotplug
index 2da0be9a0..843c615bc 100644
--- a/package/firewall/files/reflection.hotplug
+++ b/package/firewall/files/reflection.hotplug
@@ -69,7 +69,7 @@ if [ "$ACTION" = "add" ] && [ "$INTERFACE" = "wan" ]; then
config_get proto "$cfg" proto
local epmin epmax extport
- config_get extport "$cfg" src_dport
+ config_get extport "$cfg" src_dport "1-65535"
[ -n "$extport" ] || return
epmin="${extport%[-:]*}"; epmax="${extport#*[-:]}"
@@ -88,6 +88,7 @@ if [ "$ACTION" = "add" ] && [ "$INTERFACE" = "wan" ]; then
config_get inthost "$cfg" dest_ip
[ -n "$inthost" ] || return
+ [ "$proto" = all ] && proto="tcp udp"
[ "$proto" = tcpudp ] && proto="tcp udp"
[ "${inthost#!}" = "$inthost" ] || return 0