avoid exception when trying translateObj on .0.0

This commit is contained in:
Oliver Gorwits
2022-08-17 15:38:55 +01:00
parent f65301f233
commit a59af743a9

View File

@@ -4039,6 +4039,8 @@ Takes an OID and return the object name if the right MIB is loaded.
sub munge_e_type {
my $oid = shift;
return unless $oid;
return $oid if $oid =~ m/^\.0/;
my $name = &SNMP::translateObj($oid);
return $name if defined($name);