safety on snmp::info methods

This commit is contained in:
Oliver Gorwits
2019-12-21 21:34:39 +00:00
parent 0eab9213c0
commit 9ab1b24a77

View File

@@ -272,11 +272,11 @@ sub walk_fwtable {
my $snmp = App::Netdisco::Transport::SNMP->reader_for($device)
or return $cache; # already checked!
my $fw_mac = $snmp->fw_mac;
my $fw_port = $snmp->fw_port;
my $fw_mac = $snmp->fw_mac || {};
my $fw_port = $snmp->fw_port || {};
my $fw_vlan = ($snmp->can('cisco_comm_indexing') && $snmp->cisco_comm_indexing())
? {} : $snmp->qb_fw_vlan;
my $bp_index = $snmp->bp_index;
my $bp_index = $snmp->bp_index || {};
my $port_macs = get_port_macs( values %$fw_mac );