mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 17:23:08 +00:00
switch_macmap output showed mac address on the wrong port for cumulus (#4225)
switch
This commit is contained in:
parent
4d06dc05e8
commit
01bf03de74
@ -760,6 +760,7 @@ sub refresh_switch {
|
||||
printf $output "$mymac|%s\n", $self->{switches}->{$switch}->{$myport};
|
||||
}
|
||||
}
|
||||
$macport="swp".$macport;
|
||||
push @{ $index_to_vlan{$macport} }, $macvlan;
|
||||
push @{ $index_to_mac{$macport} }, $mymac;
|
||||
}
|
||||
@ -840,15 +841,15 @@ sub refresh_switch {
|
||||
my $port_index = $boid;
|
||||
my $port_name = $namemap->{ $bridgetoifmap->{$port_index} };
|
||||
my $mtu = $iftomtumap->{ $bridgetoifmap->{$port_index} };
|
||||
if (defined($index_to_mac{$port_index})) {
|
||||
push @{ $self->{macinfo}->{$switch}->{$port_name} }, @{ $index_to_mac{$port_index} };
|
||||
if (defined($index_to_mac{$port_name})) {
|
||||
push @{ $self->{macinfo}->{$switch}->{$port_name} }, @{ $index_to_mac{$port_name} };
|
||||
}
|
||||
else {
|
||||
$self->{macinfo}->{$switch}->{$port_name}->[0] = '';
|
||||
}
|
||||
|
||||
if (defined($index_to_vlan{$port_index})) {
|
||||
push @{ $self->{vlaninfo}->{$switch}->{$port_name} }, @{ $index_to_vlan{$port_index} };
|
||||
if (defined($index_to_vlan{$port_name})) {
|
||||
push @{ $self->{vlaninfo}->{$switch}->{$port_name} }, @{ $index_to_vlan{$port_name} };
|
||||
}
|
||||
else {
|
||||
$self->{vlaninfo}->{$switch}->{$port_name}->[0] = '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user