2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-18 20:30:56 +00:00

Fix if macdata does not exist

If macdata undefined, it took out all of inventory.
This commit is contained in:
Jarrod Johnson
2017-03-28 09:28:20 -04:00
parent 18d68a4057
commit d0da3108cf

View File

@ -4104,7 +4104,7 @@ sub parseboard {
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}) {
while ($macdata and $macstring !~ /00:00:00:00:00:00/ and not ref $global_sessdata->{currmacs}) {
my @currmac = splice @$macdata, 0, 6;
unless ((scalar @currmac) == 6) {
last;