From 53b52196ad3e815a1bfdb5785e01b86dd5b17ac8 Mon Sep 17 00:00:00 2001 From: CPbN Date: Thu, 10 Jan 2019 23:12:28 +0100 Subject: [PATCH] Harden SNMP request even more --- centreon-plugins/centreon/plugins/snmp.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/centreon-plugins/centreon/plugins/snmp.pm b/centreon-plugins/centreon/plugins/snmp.pm index ab28103db..f1b839e2c 100644 --- a/centreon-plugins/centreon/plugins/snmp.pm +++ b/centreon-plugins/centreon/plugins/snmp.pm @@ -326,7 +326,7 @@ sub get_leef { # Some equipments gives a partial response and no error. # We look the last value if it's empty or not - if (scalar(@$vb) && (scalar(@{@$vb[-1]}) < 3)) { + if ((scalar(@$vb) != scalar(@{$entry})) || (scalar(@{@$vb[-1]}) < 3)) { next if ($self->{snmp_autoreduce} == 1 && $self->autoreduce_leef(current => $entry) == 0); if ($dont_quit == 0) { $self->{output}->add_option_msg(short_msg => "SNMP partial response. Please try --snmp-autoreduce option");