Fix the function previously commited to work
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@836 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
ba7c3e00ab
commit
b5fd684575
@ -1063,7 +1063,7 @@ sub classful_networks_for_net_and_mask
|
||||
$given_mask = 1;
|
||||
my $masknumber = unpack("N",inet_aton($mask));
|
||||
$mask=32;
|
||||
while ($masknumber % 2) {
|
||||
until ($masknumber % 2) {
|
||||
$masknumber = $masknumber >> 1;
|
||||
$mask--;
|
||||
}
|
||||
@ -1074,7 +1074,7 @@ sub classful_networks_for_net_and_mask
|
||||
if ($bitstoeven eq 8) { $bitstoeven = 0; }
|
||||
my $resultmask = $mask + $bitstoeven;
|
||||
if ($given_mask) {
|
||||
$resultmask = inet_ntoa((2**$resultmask-1) << (32 - $resultmask));
|
||||
$resultmask = inet_ntoa(pack("N",(2**$resultmask-1) << (32 - $resultmask)));
|
||||
}
|
||||
push @results,$resultmask;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user