fix bug 3489503, ipv6 in network table will bring abnormal error for 'rspconfig cmm initnetwork=*'

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11647 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
zhaoertao 2012-02-21 03:09:35 +00:00
parent 99092c60c3
commit 533a475aca

View File

@ -377,7 +377,7 @@ sub ishostinsubnet {
$ip = getipaddr($ip,GetNumber=>1);
$subnet = getipaddr($subnet,GetNumber=>1);
$ip &= $mask;
if ($ip == $subnet) {
if ($ip && $subnet && ($ip == $subnet)) {
return 1;
} else {
return 0;