From 440ec276d3ad5ac21189d6e481d960033c0620fc Mon Sep 17 00:00:00 2001 From: Jeroen van Ingen Date: Fri, 6 Jun 2014 09:40:18 +0200 Subject: [PATCH] Fallback in determination whether a device is LLDP capable --- Info/LLDP.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Info/LLDP.pm b/Info/LLDP.pm index 0f4d7855..c7ef28d9 100644 --- a/Info/LLDP.pm +++ b/Info/LLDP.pm @@ -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; }