aboutsummaryrefslogtreecommitdiffstats
path: root/package/firewall
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
commit92fb6d16b2d7000e71bb240bf38f2ed5ed980448 (patch)
tree8fcc29a90f55007104c2fefdde09e79c0151640c /package/firewall
parent0eefc948769c6a325e4ae16db0e04a992c30d977 (diff)
downloadupstream-92fb6d16b2d7000e71bb240bf38f2ed5ed980448.tar.gz
upstream-92fb6d16b2d7000e71bb240bf38f2ed5ed980448.tar.bz2
upstream-92fb6d16b2d7000e71bb240bf38f2ed5ed980448.zip
[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')
-rw-r--r--package/firewall/Makefile2
-rw-r--r--package/firewall/files/reflection.hotplug3
2 files changed, 3 insertions, 2 deletions
diff --git a/package/firewall/Makefile b/package/firewall/Makefile
index 0cfc9c6361..05f42a62ea 100644
--- a/package/firewall/Makefile
+++ b/package/firewall/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=firewall
PKG_VERSION:=2
-PKG_RELEASE:=52
+PKG_RELEASE:=53
include $(INCLUDE_DIR)/package.mk
diff --git a/package/firewall/files/reflection.hotplug b/package/firewall/files/reflection.hotplug
index 2da0be9a05..843c615bcb 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