Disable the VLAN cache by default.

This commit is contained in:
Ramon Novoa 2017-03-15 09:56:39 +01:00
parent c957faad18
commit 4886c8ffb7
1 changed files with 3 additions and 0 deletions

View File

@ -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;