Menu

#46 UNKNOWN in the Value 0 snmptt version 1.4.2

v0.1
closed-fixed
nobody
9
2021-02-23
2020-11-04
Tom Griep
No

Bug in snmptt version 1.4.2
When this line was changed to remove most non alphanumeric characters.
$tempvar[0] =~ s/[^a-zA-Z0-9.-_]//g; # Remove most non alphanumeric characters

It caused line 3291 to fail when <unknown> is in the Value 0 of the trap when DNS is disabled or cannot be resolved.</unknown>

To fix it change line 3291 in the snmptt file from
if ($tempvar[0] =~ /<unknown>/) {</unknown>

to

if ($tempvar[0] =~ /UNKNOWN/) {

Discussion

  • Alex Burger

    Alex Burger - 2021-02-23
    • status: open --> closed-fixed
     
  • Alex Burger

    Alex Burger - 2021-02-23

    This has been fixed in 1.5beta1 but with a small change:

    if ($tempvar[0] =~ /^UNKNOWN$/) {

    Thanks for the fix.

     

Log in to post a comment.

MongoDB Logo MongoDB