Public bug reported: I upgraded from Ubuntu 16.04 to 18.04, and suddenly one of my perl snmp scripts (https://github.com/alaskacommunications/nagios_check_keepalived/blob/master/check_keepalived_vrrp.pl) started failing. When switching back to SNMP v1 (which uses getnext instead of getbulk), it gives the following errors: Use of uninitialized value $stopcond in quotemeta at /usr/lib/x86_64-linux-gnu/perl5/5.26/SNMP.pm line 884. Use of uninitialized value $stopcond in quotemeta at /usr/lib/x86_64-linux-gnu/perl5/5.26/SNMP.pm line 884. Use of uninitialized value $stopcond in quotemeta at /usr/lib/x86_64-linux-gnu/perl5/5.26/SNMP.pm line 884. Use of uninitialized value $stopcond in quotemeta at /usr/lib/x86_64-linux-gnu/perl5/5.26/SNMP.pm line 884. Use of uninitialized value $stopcond in quotemeta at /usr/lib/x86_64-linux-gnu/perl5/5.26/SNMP.pm line 884.
After digging in the changes between net-snmp in ubuntu 16.04 and 18.04, I found out the following patch is the cause of this: * fix_perl_bulk_gets.diff: Fix handling of truncated bulk get responses in the Perl module. (Patch 1278 in upstream patch tracker.) When I reverted this, everything started to work fine again :) I tried fixing the patch, and the following makes everything start working again, but still some undef warnings: --- SNMP.pm.bak 2018-10-15 16:16:15.000000000 +0200 +++ SNMP.pm 2018-12-03 15:26:22.419130670 +0100 @@ -907,7 +907,7 @@ my @newstopconds = (); my @newvarbinds = (); for (my $i = 0; $i < $num_stopconds; ++$i) { - unless ($found_eof[$i]) { + unless ($found_eof[$i] || !defined($state->{'stopconds'}[$i])) { push @newstopconds, $state->{'stopconds'}[$i]; push @newvarbinds, $state->{'varbinds'}[$i]; } So it seems like somebody with some more knowledge will need to have a look at this. Thanks Jean-Louis ** Affects: netsnmp Importance: Unknown Status: Unknown ** Affects: net-snmp (Ubuntu) Importance: Undecided Status: New ** Bug watch added: Debian Bug tracker #915401 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=915401 ** Also affects: netsnmp via https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=915401 Importance: Unknown Status: Unknown -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1806421 Title: perl_bulk_gets patch breaks some scripts To manage notifications about this bug go to: https://bugs.launchpad.net/netsnmp/+bug/1806421/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs