Disable the VLAN cache by default.
This commit is contained in:
parent
c957faad18
commit
4886c8ffb7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue