Fallback in determination whether a device is LLDP capable

This commit is contained in:
Jeroen van Ingen
2014-06-06 09:40:18 +02:00
parent 6e91b90c48
commit 440ec276d3

View File

@@ -90,8 +90,12 @@ sub hasLLDP {
# We may be have LLDP, but nothing in lldpRemoteSystemsData Tables
# so we could be running LLDP but not return any useful information
my $lldp_cap = $lldp->lldp_sys_cap();
return 1 if defined $lldp_cap;
# If the device doesn't return local system capabilities, fallback by checking if it would report neighbors
my $lldp_rem = $lldp->lldp_rem_id() || {};
return 1 if scalar keys %$lldp_rem;
return;
}