#475 fix discover plugins do not respect ignore* config
This commit is contained in:
@@ -18,6 +18,10 @@ register_worker({ phase => 'main', driver => 'snmp' }, sub {
|
||||
my $ssidlist = $snmp->i_ssidlist;
|
||||
return unless scalar keys %$ssidlist;
|
||||
|
||||
# cache the device ports to save hitting the database for many single rows
|
||||
my $device_ports = vars->{'device_ports'}
|
||||
|| { map {($_->port => $_)} $device->ports->all };
|
||||
|
||||
my $interfaces = $snmp->interfaces;
|
||||
my $ssidbcast = $snmp->i_ssidbcast;
|
||||
my $ssidmac = $snmp->i_ssidmac;
|
||||
@@ -36,6 +40,12 @@ register_worker({ phase => 'main', driver => 'snmp' }, sub {
|
||||
next;
|
||||
}
|
||||
|
||||
if (!defined $device_ports->{$port}) {
|
||||
info sprintf ' [%s] wireless - local port %s not in database!',
|
||||
$device->ip, $port;
|
||||
next;
|
||||
}
|
||||
|
||||
push @ssids, {
|
||||
port => $port,
|
||||
ssid => $ssidlist->{$entry},
|
||||
@@ -64,6 +74,12 @@ register_worker({ phase => 'main', driver => 'snmp' }, sub {
|
||||
next;
|
||||
}
|
||||
|
||||
if (!defined $device_ports->{$port}) {
|
||||
info sprintf ' [%s] wireless - local port %s not in database!',
|
||||
$device->ip, $port;
|
||||
next;
|
||||
}
|
||||
|
||||
push @channels, {
|
||||
port => $port,
|
||||
channel => $channel->{$entry},
|
||||
|
||||
Reference in New Issue
Block a user