From 0ff61622c8ae46edb3cb8c9dfa31fe35b0f394b9 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 14 May 2010 12:29:05 +0000 Subject: [PATCH] -Correct problem of accidentally masking out 16 bits too many in vmware mac addresses git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6116 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/VMCommon.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/VMCommon.pm b/perl-xCAT/xCAT/VMCommon.pm index a42ad4c84..9f712a4b1 100644 --- a/perl-xCAT/xCAT/VMCommon.pm +++ b/perl-xCAT/xCAT/VMCommon.pm @@ -214,7 +214,7 @@ sub genMac { #Generates a mac address for a node, does NOT assure uniqueness, ca if ($prefix) { #Specific prefix requested, honor it my $tail = int(rand(0xffffff)); #With only 24 bits of space, use random bits; if ($prefix eq '00:50:56') { #vmware reserves certain addresses in their scheme if this prefix used - $tail = $tail&0x3f; #mask out the two bits in question + $tail = $tail&0x3fffff; #mask out the two bits in question } $tail = sprintf("%06x",$tail); $tail =~ s/(..)(..)(..)/:$1:$2:$3/;