puresnmp
puresnmp copied to clipboard
Prevent endless loops cause by incorrect SNMP implementations
I've run into a bug in a network device which does not behave correctly on GetNext requests. Instead of returning the next OID it will return the same OID as the one requested on some rare occasions.
This causes endless loops on walk
and bulkwalk
(and thus table
requests as well). A check should be introduced that verifies that the OID received by getnext
is different from the one passed in. A more precise check would be to check if the returned OID is "larger" than the one passed in.
These checks may have a considerable performance impact on larger walk
operations, primarily the check if the OID is increasing. They should therefore be made optional.