ipv6_network(): Use valid_ipv6prefix().

This commit is contained in:
Mikhail Efremov 2012-12-07 16:57:16 +04:00
parent 3cb17360d3
commit 12a20dd894

View File

@ -140,8 +140,9 @@ ipv6_network()
local ip="$(ipv6addr_expand "${1%%/*}")"
local prefix="${1##*/}"
[ -n "$ip" -a "$prefix" -ge 1 -a "$prefix" -le 128 ] 2>/dev/null ||
if [ -z "$ip" ] || ! valid_ipv6prefix "$prefix"; then
return 1
fi
local IFS=":"
set -- $ip