Fix problem where ula generation failed to deal properly with hexadecimal
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13134 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
1762312121
commit
5383a88a60
@ -216,13 +216,13 @@ sub autoulaaddress {
|
||||
my $prefix = $::XCATSITEVALS{autoulaprefix};
|
||||
$suffix =~ /(..):(..:..):(..:..):(..)/;
|
||||
my $leadbyte = $1;
|
||||
my $mask = (($leadbyte & 2) ^ 2);
|
||||
my $mask = ((hex($leadbyte) & 2) ^ 2);
|
||||
if ($mask) {
|
||||
$leadbyte = $leadbyte | $mask;
|
||||
$leadbyte = hex($leadbyte) | $mask;
|
||||
} else {
|
||||
$leadbyte = $leadbyte & 0xfd; #mask out the one bit
|
||||
$leadbyte = hex($leadbyte) & 0xfd; #mask out the one bit
|
||||
}
|
||||
$suffix = "$leadbyte$2ff:fe$3$4";
|
||||
$suffix = sprintf("%02x$2ff:fe$3$4",$leadbyte);
|
||||
|
||||
return $prefix.$suffix;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user