Skip to content

Commit

Permalink
Merge pull request #1325 from CPbN/harden
Browse files Browse the repository at this point in the history
Harden SNMP request even more
  • Loading branch information
qgarnier authored Jan 11, 2019
2 parents 801153d + 8779a23 commit 39a9fd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion centreon/plugins/snmp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 39a9fd0

Please sign in to comment.