diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index 82f5e544f8..80b52e1c3e 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -116,6 +116,7 @@ sub new { # Per device VLAN cache. vlan_cache => {}, + vlan_cache_enabled => 0, # Configuration parameters. all_ifaces => 0, @@ -316,6 +317,8 @@ sub find_vlans ($$) { my ($self, $device) = @_; my %vlan_hash; + return unless ($self->{'vlan_cache_enabled'} == 1); + foreach my $vlan ($self->snmp_get_value_array($device, $VTPVLANIFINDEX)) { next if $vlan eq '0'; $vlan_hash{$vlan} = 1;