Commit f66d9e1a authored by neilpang's avatar neilpang
Browse files
parent ccd3d969
...@@ -4196,7 +4196,12 @@ _match_issuer() { ...@@ -4196,7 +4196,12 @@ _match_issuer() {
#ip #ip
_isIPv4() { _isIPv4() {
for seg in $(echo "$1" | tr '.' ' '); do for seg in $(echo "$1" | tr '.' ' '); do
if [ $seg -ge 0 ] 2>/dev/null && [ $seg -le 255 ] 2>/dev/null; then _debug2 seg "$seg"
if [ "$(echo "$seg" | tr -d [0-9])" ]; then
#not all number
return 1
fi
if [ $seg -ge 0 ] && [ $seg -lt 256 ]; then
continue continue
fi fi
return 1 return 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment