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.
I have submitted two patches (note that they are identical) for 5.4.1 and 5.4.2.1: 2538183: 5.4.2.1: Prevent infinite retries for an invalid error-index (2009-01-26 12:51) 2538169: 5.4.1: Prevent infinite retries for an invalid error-index (2009-01-26 12:44) Are there any further steps that I should take to get this infinite-loop issue resolved? Doug On Fri, Jan 23, 2009 at 1:42 PM, Doug Manley <[email protected]> wrote: > > 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. > > What I want to implement is a retry counter that prevents this from > happening. I was going to add it to the whole netsnmp_ds piece with the > following options: > #define NETSNMP_DS_LIB_PDU_FIX_LIMIT 34 // If a request fails and the PDU > would historically be fixed and retried, only retry *this* many times. > Default: 5. > > This will prevent infinite loops when asking for something and nothing is > ever going to be retrieved. > > This is becoming important for my company, so I want to get on this and have > a patch out quickly. > > Thoughts? > Doug ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
