2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-21 10:40:24 +00:00

fix issue 2336, get correct mac address

This commit is contained in:
XuWei
2016-12-21 02:58:53 -05:00
parent c2d522ddf3
commit 804fd4c4e5

View File

@@ -293,6 +293,17 @@ sub check_noderange {
$mac =~ s/\!\*NOIP\*//g;
$macmap{$mac}{"ip"} = "NOIP";
$macmap{$mac}{"node"} = $node;
} elsif ($mac =~ /(\w{2}:\w{2}:\w{2}:\w{2}:\w{2}:\w{2})\!(.+)/) {
$mac = $1;
my $tmp_node = $2;
$macmap{$mac}{"node"} = $node;
my $tmp_ip = xCAT::NetworkUtils->getipaddr($tmp_node);
if ($tmp_ip) {
$macmap{$mac}{"ip"} = $tmp_ip;
$ipnodemap{ $nodecheckrst{$node}{"ip"} } = $node;
} else {
$macmap{$mac}{"ip"} = "NOIP";
}
} else {
$macmap{$mac}{"node"} = $node;
$macmap{$mac}{"ip"} = $nodecheckrst{$node}{"ip"};