1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-24 21:32:59 +02:00

[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
This commit is contained in:
jow 2010-05-31 01:34:47 +00:00
parent b95109266d
commit ddb7d35392
2 changed files with 2 additions and 2 deletions

View File

@ -87,8 +87,8 @@ config_get_ipaddr() {
local vers= local vers=
case "$addr" in case "$addr" in
*.*) vers=4; mask="${mask:-32}" ;;
*:*) vers=6; mask="${mask:-128}" ;; *:*) vers=6; mask="${mask:-128}" ;;
*.*) vers=4; mask="${mask:-32}" ;;
esac esac
export ${NO_EXPORT:+-n} -- "${varn}=${addr}" export ${NO_EXPORT:+-n} -- "${varn}=${addr}"

View File

@ -51,8 +51,8 @@ fw__exec() { # <action> <family> <table> <chain> <target> <position> { <rules> }
shift shift
while [ "$1" != '}' ]; do while [ "$1" != '}' ]; do
case "$1" in case "$1" in
*.*.*.*) ip4=1 ;;
*:*) ip6=1 ;; *:*) ip6=1 ;;
*.*.*.*) ip4=1 ;;
esac esac
shift shift
done done