firewall: fix port range quirk in previous commit
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 1 Jul 2011 11:50:48 +0000 (11:50 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 1 Jul 2011 11:50:48 +0000 (11:50 +0000)
SVN-Revision: 27335

package/firewall/files/reflection.hotplug

index 7ab4c5fe81e602d14b1da18d3be022263a59b701..15e350082a1230084565d2d8bbc3e9b0b09d556b 100644 (file)
@@ -71,13 +71,13 @@ if [ "$ACTION" = "add" ] && [ "$INTERFACE" = "wan" ]; then
                                [ -n "$extport" ] || return
 
                                epmin="${extport%[-:]*}"; epmax="${extport#*[-:]}"
-                               [ "$epmin" != "$epmax" ] || epmax=""
+                               [ "${epmin#!}" != "$epmax" ] || epmax=""
 
                                local ipmin ipmax intport
                                config_get intport "$cfg" dest_port "$extport"
 
                                ipmin="${intport%[-:]*}"; ipmax="${intport#*[-:]}"
-                               [ "$ipmin" != "$ipmax" ] || ipmax=""
+                               [ "${ipmin#!}" != "$ipmax" ] || ipmax=""
 
                                local exthost
                                config_get exthost "$cfg" src_dip "$wanip"