ipv6_network(): Use valid_ipv6prefix().
This commit is contained in:
parent
3cb17360d3
commit
12a20dd894
@ -140,8 +140,9 @@ ipv6_network()
|
|||||||
local ip="$(ipv6addr_expand "${1%%/*}")"
|
local ip="$(ipv6addr_expand "${1%%/*}")"
|
||||||
local prefix="${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
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
local IFS=":"
|
local IFS=":"
|
||||||
set -- $ip
|
set -- $ip
|
||||||
|
Loading…
x
Reference in New Issue
Block a user