diff --git a/xCAT-server/lib/xcat/plugins/lsslp.pm b/xCAT-server/lib/xcat/plugins/lsslp.pm index 5dd3065c0..3982b734a 100644 --- a/xCAT-server/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server/lib/xcat/plugins/lsslp.pm @@ -2519,6 +2519,7 @@ sub parse_responses { push @$data, undef; #This is for $data[9], which is mac address; trace ( $request, " $h find the parent $parent.", 1); + ########################################################## #find the mac address ########################################################## $newhostname = match_hosts_defined_by_xcatsetup($h, $type, $mtm, $sn, $side, $ip0, $cagenum, $bpamtm, $bpasn, $parent, \$matchflag); @@ -4092,7 +4093,7 @@ sub match_hosts_defined_by_xcatsetup { my $unmatched = @{$::OLD_DATA_CACHE{$oldnode}}[7]; if ($type eq TYPE_FRAME) { - if ($tmpmtm eq $mtm and $tmpsn eq $sn) { + if ($tmpmtm eq $mtm and $tmpsn eq $sn and $type eq $tmptype) { $$flagref = 1; print "20 got old name $oldnode\n" if($DEBUG_MATCH eq 1); return $oldnode; @@ -4100,7 +4101,7 @@ sub match_hosts_defined_by_xcatsetup { } if ($type eq TYPE_CEC) { - if ($pname eq $tmpparent and $cage_number eq $tmpid) { + if ($pname eq $tmpparent and $cage_number eq $tmpid and $type eq $tmptype) { $$flagref = 1; print "21 got old name $oldnode\n" if($DEBUG_MATCH eq 1); return $oldnode; @@ -4108,7 +4109,7 @@ sub match_hosts_defined_by_xcatsetup { } if ($type eq TYPE_BPA or $type eq TYPE_FSP) { - if ($pname eq $tmpparent and $side eq $tmpside) { + if ($pname eq $tmpparent and $side eq $tmpside and $type eq $tmptype) { $$flagref = 1; print "22 got old name $oldnode\n" if($DEBUG_MATCH eq 1); return $oldnode; @@ -4116,7 +4117,7 @@ sub match_hosts_defined_by_xcatsetup { } if ($type eq TYPE_BPA or $type eq TYPE_FSP) { - if ($pname eq $tmpparent and $side eq $tmpside) { + if ($pname eq $tmpparent and $side eq $tmpside and $type eq $tmptype) { $$flagref = 1; print "23 got old name $oldnode\n" if($DEBUG_MATCH eq 1); return $oldnode;