From: Jo-Philipp Wich Date: Mon, 31 May 2010 01:34:47 +0000 (+0000) Subject: firewall: change the order of IPv4/IPv6 address detection, fixes mixed notation v6... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a756114e593fe2c287c46f75f4bff6e8bc363ebf;p=openwrt%2Fstaging%2Frobimarko.git firewall: change the order of IPv4/IPv6 address detection, fixes mixed notation v6 improperly detected as v4 address SVN-Revision: 21642 --- diff --git a/package/firewall/files/lib/config.sh b/package/firewall/files/lib/config.sh index c21391266a..996cef884d 100644 --- a/package/firewall/files/lib/config.sh +++ b/package/firewall/files/lib/config.sh @@ -87,8 +87,8 @@ config_get_ipaddr() { local vers= case "$addr" in - *.*) vers=4; mask="${mask:-32}" ;; *:*) vers=6; mask="${mask:-128}" ;; + *.*) vers=4; mask="${mask:-32}" ;; esac export ${NO_EXPORT:+-n} -- "${varn}=${addr}" diff --git a/package/firewall/files/lib/fw.sh b/package/firewall/files/lib/fw.sh index 553642070c..86e817182b 100644 --- a/package/firewall/files/lib/fw.sh +++ b/package/firewall/files/lib/fw.sh @@ -51,8 +51,8 @@ fw__exec() { # { } shift while [ "$1" != '}' ]; do case "$1" in - *.*.*.*) ip4=1 ;; *:*) ip6=1 ;; + *.*.*.*) ip4=1 ;; esac shift done