Fix NetworkUtils.pm to work correctly with IPv6 nets with '/64' in netmask field
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12237 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -365,7 +365,12 @@ sub ishostinsubnet { | ||||
|         $numbits=128; | ||||
|     } | ||||
|     if ($mask) { | ||||
|         $mask=getipaddr($mask,GetNumber=>1); | ||||
| 	if ($mask =~ /\//) { | ||||
| 	    $mask =~ s/^\///; | ||||
|             $mask=Math::BigInt->new("0b".("1"x$mask).("0"x($numbits-$mask))); | ||||
| 	} else { | ||||
| 	        $mask=getipaddr($mask,GetNumber=>1); | ||||
| 	} | ||||
|     } else {  #CIDR notation supported | ||||
|         if ($subnet =~ /\//) {  | ||||
|             ($subnet,$mask) = split /\//,$subnet,2; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user