firewall: fix bad number error in fw_redirect() (#6704)
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 20 Feb 2010 03:39:55 +0000 (03:39 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 20 Feb 2010 03:39:55 +0000 (03:39 +0000)
SVN-Revision: 19765

package/firewall/files/uci_firewall.sh

index 207dcd8df47d4dcc972279a08cc0c1ea4abdb446..4921b91bae75bd4e204fff60afd8f58691b70fc9 100755 (executable)
@@ -355,18 +355,18 @@ fw_redirect() {
 
        src_port_first=${src_port%-*}
        src_port_last=${src_port#*-}
-       [ "$src_port_first" -ne "$src_port_last" ] && { \
+       [ "$src_port_first" != "$src_port_last" ] && { \
                src_port="$src_port_first:$src_port_last"; }
 
        src_dport_first=${src_dport%-*}
        src_dport_last=${src_dport#*-}
-       [ "$src_dport_first" -ne "$src_dport_last" ] && { \
+       [ "$src_dport_first" != "$src_dport_last" ] && { \
                src_dport="$src_dport_first:$src_dport_last"; }
 
        dest_port2=${dest_port:-$src_dport}
        dest_port_first=${dest_port2%-*}
        dest_port_last=${dest_port2#*-}
-       [ "$dest_port_first" -ne "$dest_port_last" ] && { \
+       [ "$dest_port_first" != "$dest_port_last" ] && { \
                dest_port2="$dest_port_first:$dest_port_last"; }
 
        add_rule() {