From b7494523042263924cd4b1f6a732dcdf88e8c093 Mon Sep 17 00:00:00 2001 From: yinle Date: Sun, 23 Oct 2011 09:29:32 +0000 Subject: [PATCH] Fix mistake that lsslp will match the wrong definition. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10857 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/lsslp.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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;