2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-07-30 08:11:20 +00:00

Wrong mac address showing for switchdiscover command (#3131)

This commit is contained in:
cxhong
2017-05-25 01:14:16 -04:00
committed by yangsong
parent f564dde262
commit 7ff64b220f
2 changed files with 4 additions and 1 deletions

View File

@@ -1266,7 +1266,7 @@ sub get_mac_by_arp ()
} else {
($ip, $mac) = (undef, undef);
}
if (@$IP[1] !~ $ip) {
if (@$IP[1] ne $ip) {
($ip, $mac) = (undef, undef);
} else {
last;

View File

@@ -38,6 +38,7 @@ my %global_mac_identity = (
"6c:ae:8b" => "BNT G8264-T switch",
"fc:cf:62" => "BNT G8124 switch",
"7c:fe:90" => "Mellanox IB switch",
"cc:37:ab" => "Edgecore Networks Switch",
"8c:ea:1b" => "Edgecore Networks Switch"
);
@@ -54,6 +55,8 @@ my %global_switch_type = (
mellanox => "Mellanox",
MLNX => "Mellanox",
MELLAN => "Mellanox",
Cumulus => "onie",
cumulus => "onie",
Edgecore => "onie"
);