fix bug in vlan filtered netmap, duplicate nodes

This commit is contained in:
Oliver Gorwits
2020-01-22 21:19:04 +00:00
parent abf415a1ca
commit ee86e62ac7
2 changed files with 12 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
2.044006 - 2019-01-22
[BUG FIXES]
* #677 neighbors map with VLAN filter should only consider configured ports
2.044005 - 2019-01-19
[ENHANCEMENTS]
@@ -13,8 +19,8 @@
* #81 (redux) avoid DEPRECATED warning from DBIC
* #524 ipinventory misses mac address for device ips
* #667 neighbors map with VLAN filter should only consider configured ports
* #676 remove vim settings from files
* #677 neighbors map with VLAN filter should only consider configured ports
* #679 uninitialised error
* #686 makerancidconf excluded setting should be (ACL) list not dict

View File

@@ -216,7 +216,10 @@ ajax '/ajax/data/device/netmap' => require_login sub {
);
}
my %seen_node = ();
DEVICE: while (my $device = $devices->next) {
next if $seen_node{$device->ip};
# if in neighbors mode then use %ok_dev to filter
next DEVICE if ($device->ip ne $qdev->ip)
and ($mapshow eq 'neighbors')
@@ -269,6 +272,8 @@ ajax '/ajax/data/device/netmap' => require_login sub {
}
push @{$data{'nodes'}}, $node;
++$seen_node{$device->ip};
$metadata{'centernode'} = $device->ip
if $qdev and $qdev->in_storage and $device->ip eq $qdev->ip;
}