firewall: also set up nat reflection rules for redirects with proto all and/or no...
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 9 Jul 2012 12:23:36 +0000 (12:23 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 9 Jul 2012 12:23:36 +0000 (12:23 +0000)
SVN-Revision: 32652

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

index 0cfc9c6361b48c5be3cba205b76fd11f5546385f..05f42a62eab7e2139f631d3b163906f569bbc548 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 2da0be9a05675c2eed168d6aad82708892ef3eb2..843c615bcbb6d17d678a3e96ae93752f6713ad30 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