2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

add new UT and polished

This commit is contained in:
bybai 2018-07-11 01:58:31 -04:00
parent d3e73fb435
commit cc7ad619cc

View File

@ -2156,7 +2156,7 @@ sub isIpaddr
return 0;
}
if ($1 > 255 || $1 =~ /^0/ || $2 > 255 || $2 =~ /^0+(\d)/ || $3 > 255 || $3 =~ /^0+(\d)/ || $4 > 255 || $4 =~ /^0+(\d)/)
if ($1 > 255 || $1 =~ /^0/ || $2 > 255 || $2 =~ /^0\d/ || $3 > 255 || $3 =~ /^0\d/ || $4 > 255 || $4 =~ /^0\d/)
{
return 0;
}