#816 skip duplicate bssid on ports on wireless discovery

This commit is contained in:
Oliver Gorwits
2021-09-26 08:27:46 +01:00
parent 1a5b06da96
commit 854f19d49e
2 changed files with 17 additions and 2 deletions

View File

@@ -1,10 +1,16 @@
2.049005 - 2021-09-xx
[BUG FIXES]
* #816 skip duplicate bssid on ports on wireless discovery
2.049005 - 2021-09-09
[ENHANCEMENTS]
* #811 change duplicate job status from 'error' to 'info'
[BUG FIXES
[BUG FIXES]
* #809 fix crash in Node search due to regexp translation perl to SQL

View File

@@ -29,7 +29,7 @@ register_worker({ phase => 'main', driver => 'snmp' }, sub {
my $power = $snmp->dot11_cur_tx_pwr_mw;
# build device ssid list suitable for DBIC
my @ssids;
my (%ssidseen, @ssids);
foreach my $entry (keys %$ssidlist) {
(my $iid = $entry) =~ s/\.\d+$//;
my $port = $interfaces->{$iid};
@@ -46,6 +46,15 @@ register_worker({ phase => 'main', driver => 'snmp' }, sub {
next;
}
next unless $ssidmac->{$entry};
if (exists $ssidseen{$port}{ $ssidmac->{$entry} }) {
debug sprintf ' [%s] wireless - duplicate bssid %s on port %s',
$device->ip, $ssidmac->{$entry}, $port;
next;
}
++$ssidseen{$port}{ $ssidmac->{$entry} };
push @ssids, {
port => $port,
ssid => $ssidlist->{$entry},