Fix valid_ipv4addr().

Fix first byte check.
This commit is contained in:
Mikhail Efremov 2015-01-20 21:54:59 +03:00
parent 24d6e13f02
commit dd587ca6c3

View File

@ -46,7 +46,8 @@ valid_ipv4addr()
i=$(($i+1))
done
[ $i -eq 2 ] 2>/dev/null ||
[ $i -eq 2 -a \
"$byte" -gt 0 -a "$byte" -lt 255 ] 2>/dev/null ||
return 1
}