diff --git a/Netdisco/Changes b/Netdisco/Changes index 71f7cf76..4492b244 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -16,6 +16,7 @@ * Do not leak SNMP community string into debug output (unless SHOW_COMMUNITY=1) * Process tree updated to show daemon worker status/activity * Handle management IP of one device being in use on another device + * Log at debug the vlan reindexing in macsuck [BUG FIXES] diff --git a/Netdisco/lib/App/Netdisco/Util/SNMP.pm b/Netdisco/lib/App/Netdisco/Util/SNMP.pm index f304f0e6..ab659bc2 100644 --- a/Netdisco/lib/App/Netdisco/Util/SNMP.pm +++ b/Netdisco/lib/App/Netdisco/Util/SNMP.pm @@ -374,7 +374,7 @@ community indexing, with the given C<$vlan> ID. Works for all SNMP versions. sub snmp_comm_reindex { my ($snmp, $device, $vlan) = @_; - my $ver = $snmp->snmp_ver; + my $ver = $snmp->snmp_ver; if ($ver == 3) { my $prefix = ''; @@ -385,10 +385,17 @@ sub snmp_comm_reindex { $prefix = $c->{context_prefix} and last; } $prefix ||= 'vlan-'; + + debug + sprintf '[%s] reindexing to "%s%s" (ver: %s, class: %s)', + $device->ip, $prefix, $vlan, $ver, $snmp->class; $snmp->update(Context => ($prefix . $vlan)); } else { my $comm = $snmp->snmp_comm; + + debug sprintf '[%s] reindexing to vlan %s (ver: %s, class: %s)', + $device->ip, $vlan, $ver, $snmp->class; $snmp->update(Community => $comm . '@' . $vlan); } }