[package] firewall: also set up nat reflection rules for redirects with proto all...
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 9 Jul 2012 12:23:36 +0000 (12:23 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 9 Jul 2012 12:23:36 +0000 (12:23 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32652 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/firewall/Makefile
package/firewall/files/reflection.hotplug

index 0cfc9c6..05f42a6 100644 (file)
@@ -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
 
index 2da0be9..843c615 100644 (file)
@@ -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