netdisco / snmp-info

Other
35 stars 31 forks source link

Perl error message seen in module SNMP::Info::Aggregate and SNMP::Info::CiscoAgg #506

Closed earendilfr closed 6 months ago

earendilfr commented 6 months ago

Current Behavior

I can see currently a lot of error message in netdisco logs regarding the module SNMP::Info::Aggregate (and SNMP::Info::CiscoAgg). When I check the file, I suspect that, for an unknown reason, I receive sometime a value that is not a valid ifType value and so, I have a bug on perl file...

Use of uninitialized value in string eq at /opt/netdisco/perl5/lib/perl5/SNMP/Info/CiscoAgg.pm line 156.
Use of uninitialized value in string eq at /opt/netdisco/perl5/lib/perl5/SNMP/Info/CiscoAgg.pm line 156.
Use of uninitialized value in string eq at /opt/netdisco/perl5/lib/perl5/SNMP/Info/Aggregate.pm line 66.
Use of uninitialized value in string eq at /opt/netdisco/perl5/lib/perl5/SNMP/Info/Aggregate.pm line 66.
Use of uninitialized value in string eq at /opt/netdisco/perl5/lib/perl5/SNMP/Info/Aggregate.pm line 66.
Use of uninitialized value in string eq at /opt/netdisco/perl5/lib/perl5/SNMP/Info/Aggregate.pm line 66.
Use of uninitialized value in string eq at /opt/netdisco/perl5/lib/perl5/SNMP/Info/CiscoAgg.pm line 156.
Use of uninitialized value in string eq at /opt/netdisco/perl5/lib/perl5/SNMP/Info/CiscoAgg.pm line 156.
Use of uninitialized value in string eq at /opt/netdisco/perl5/lib/perl5/SNMP/Info/Aggregate.pm line 66.
Use of uninitialized value in string eq at /opt/netdisco/perl5/lib/perl5/SNMP/Info/Aggregate.pm line 66.
Use of uninitialized value in string eq at /opt/netdisco/perl5/lib/perl5/SNMP/Info/Aggregate.pm line 66.
Use of uninitialized value in string eq at /opt/netdisco/perl5/lib/perl5/SNMP/Info/Aggregate.pm line 66.

Possible Solution

Validate that the entry $ifType->{ $higher } really exist

Context

Message seen in my current Netdisco instance

Your Environment

ollyg commented 6 months ago

many thanks @earendilfr ! fixed in 5af11cb6