From 05da0afb99dc7c68193a41a4069ad8446fc1fdbc Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 7 Mar 2016 15:26:42 -0500 Subject: [PATCH] Suppress invalid mac data Sometimes a FRU MAC address area may have unitialized data for irrelevant portion. Mask by filtering out scenarios where mfg OUI changes for a single NIC, which is never the case. --- xCAT-server/lib/xcat/plugins/ipmi.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index 1ec057532..626b24095 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -3772,13 +3772,17 @@ sub parseboard { #time to process the mac field... my $macdata = $boardinf{extra}->[6]->{value}; my $macstring = "1"; + my $macprefix; while ($macstring !~ /00:00:00:00:00:00/ and not ref $global_sessdata->{currmacs}) { my @currmac = splice @$macdata,0,6; unless ((scalar @currmac) == 6) { last; } $macstring = sprintf("%02x:%02x:%02x:%02x:%02x:%02x",@currmac); - if ($macstring !~ /00:00:00:00:00:00/) { + unless ($macprefix) { + $macprefix = substr($macstring, 0, 8); + } + if ($macstring !~ /00:00:00:00:00:00/ and $macstring =~/^$macprefix/) { push @{$boardinf{macaddrs}},$macstring; } }