summaryrefslogtreecommitdiff
path: root/package/firewall/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-07-09 12:23:36 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-07-09 12:23:36 +0000
commit4127e73b845b0bb7f656bea1d887a32cee0f2388 (patch)
tree3f776daf296fde87ea02bc57bdd4624729472528 /package/firewall/files
parent86de034767ea5ce560a55fa1cb59fec9ea6fcc20 (diff)
downloadmtk-20170518-4127e73b845b0bb7f656bea1d887a32cee0f2388.zip
mtk-20170518-4127e73b845b0bb7f656bea1d887a32cee0f2388.tar.gz
mtk-20170518-4127e73b845b0bb7f656bea1d887a32cee0f2388.tar.bz2
firewall: also set up nat reflection rules for redirects with proto all and/or no src_dport set
SVN-Revision: 32652
Diffstat (limited to 'package/firewall/files')
-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 2da0be9..843c615 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