diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-31 01:34:47 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-31 01:34:47 +0000 |
commit | df297315f7b2e228ede7eae4ecafd0216149d37f (patch) | |
tree | 3f1f2fb73b160632573be73db7aa89e542b9e264 /package/firewall | |
parent | df5316431d124ed656dc043406e5e7c470f192f3 (diff) | |
download | upstream-df297315f7b2e228ede7eae4ecafd0216149d37f.tar.gz upstream-df297315f7b2e228ede7eae4ecafd0216149d37f.tar.bz2 upstream-df297315f7b2e228ede7eae4ecafd0216149d37f.zip |
[package] firewall: change the order of IPv4/IPv6 address detection, fixes mixed notation v6 improperly detected as v4 address
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21642 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/firewall')
-rw-r--r-- | package/firewall/files/lib/config.sh | 2 | ||||
-rw-r--r-- | package/firewall/files/lib/fw.sh | 2 |
2 files changed, 2 insertions, 2 deletions
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() { # <action> <family> <table> <chain> <target> <position> { <rules> } shift while [ "$1" != '}' ]; do case "$1" in - *.*.*.*) ip4=1 ;; *:*) ip6=1 ;; + *.*.*.*) ip4=1 ;; esac shift done |