From e08d22d51ccdd4b2a70ca8b40abf7bab24eee96f Mon Sep 17 00:00:00 2001 From: nick n <39005454+inphobia@users.noreply.github.com> Date: Sun, 14 Apr 2019 21:10:26 +0200 Subject: [PATCH] flush cache in bp_index netdisco/netdisco#496 has more background on the issue. somewhere incorrect data is returned for bp_index mappings when running macsuck, but i cannot reproduce this when using snmp::info directly. forcing i_index to reload works around the issue, performance impact is minimal. --- lib/SNMP/Info/Layer2/Aerohive.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/SNMP/Info/Layer2/Aerohive.pm b/lib/SNMP/Info/Layer2/Aerohive.pm index 85a88a06..beaf96da 100644 --- a/lib/SNMP/Info/Layer2/Aerohive.pm +++ b/lib/SNMP/Info/Layer2/Aerohive.pm @@ -221,7 +221,10 @@ sub bp_index { my $aerohive = shift; my $partial = shift; - my $i_index = $aerohive->i_index($partial) || {}; + # somewhere caching is doing something strange, without load_ + # netdisco can't find bp_index mappings & will not registerer + # any clients. netdisco/netdisco#496 + my $i_index = $aerohive->load_i_index($partial) || {}; my %bp_index; foreach my $iid ( keys %$i_index ) {