Hi Austin.
Austin Schutz wrote:
I sent this to the list a few weeks ago w/out any response. Is there a specific person/group responsible for the perl stuff I should be contacting?
This is the correct list. There are less people familar with the Perl modules than the main package, and the ones who are familiar with it are probably just busy.
On Wed, Mar 09, 2005 at 11:13:36AM -0800, Austin Schutz wrote:
We've run into a situation where a few of our devices occasionally return the same oid sent when doing a walk or bulkwalk. The snmpwalk/snmpbulkwalk tools detect this error and properly return an "OID not increasing" error, but the perl module doesn't.
In the module, it actually checks for repeating oids and explicitly ignores them (from SNMP.xs in the _bulkwalk_recv_pdu() function):
/* If this is not the first packet, skip any duplicated OID values, if ** present. These should be the seed values copied from the last OID's ** of the previous packet. In practice we don't see this, but it is ** easy enough to do, and will avoid confusion for the caller from mis- ** behaving agents (badly misbehaving... ;^). */ if ((context->pkts_exch > 1) && (pix < context->repeaters)) { if (__oid_cmp(vars->name, vars->name_length, context->reqbase[pix].last_oid, context->reqbase[pix].last_len) == 0) { DBPRT(2, (DBOUT "Ignoring repeat oid: %s\n", snprint_objid(_debugx, sizeof(_debugx), vars->name,vars-
name_length)));
continue; } }
..so it seems like this is intentional. But for us, it's messing up our pollers because they are getting hung up on hitting the same oid over and over. What would I break by changing it to stop ignoring these duplicates?
I don't know what would break by changing it, but have you tried it? If you remove the code, does it function as expected?
Snmpwalk and snmpbulkwalk have an option to not check if OIDs are increasing:
-C APPOPTS Set various application specific behaviours:
c: do not check returned OIDs are increasingWhen enabled, it looks like if there is a duplicate OID, the 'Error: OID not increasing:' error appears and the walk it aborted. Is that correct?
If it is disabled, does it keep going and print all the duplicates?
If my assumptions above are correct, then removing the code should give you what you need. If it does, then an option could be added to enable / disable this in the Perl module with a $SNMP::dontCheckOIDIncreasing or something similar.
Alex
The version of code I'm looking at is net-snmp-5.1.
Thanks!
Austin
------------------------------------------------------- This SF.net email is sponsored by Demarc: A global provider of Threat Management Solutions. Download our HomeAdmin security software for free today! http://www.demarc.com/Info/Sentarus/hamr30 _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
