Menu

#966 5.4.2.1: Prevent infinite retries for an invalid error-index

closed
nobody
None
5
2012-11-08
2009-01-26
Doug Manley
No

It is becoming frequent that a dialog like this happens:
Me: SNMP_GET ifName.1
Agent: noSuchName (error-index: 2)
Me: "2", okay. Let me remove the second OID and try again. SNMP_GET
ifName.1
Agent: noSuchName (error-index: 2)
Me: "2", okay. Let me remove the second OID and try again. SNMP_GET
ifName.1
Agent: noSuchName (error-index: 2)
Me: "2", okay. Let me remove the second OID and try again. SNMP_GET
ifName.1
...

Here, "error-index" should be "1"; however, the agent is improperly
returning "2". The library should be able to handle such situations and
not be tricked into looping indefinitely.

I have updated the "snmp_fix_pdu" function to fail if (in addition to the
current failure conditions) the error-index value is greater than the
number of variables in the PDU.

This patch is for 5.4.2.1

Note that it is EXACTLY the same as the patch for 5.4.1.

Discussion

  • Doug Manley

    Doug Manley - 2009-01-27

    This patch works on gentoo; it includes "snmplib/"

     
  • Doug Manley

    Doug Manley - 2009-01-27

    File Added: net-snmp-5.4.2.1.infinite-fix-loop.patch

     
  • Dave Shield

    Dave Shield - 2009-04-08

    Duplicate of patch #2538169
    SVN revision 17472

     

Log in to post a comment.