[AGENT++] SNMPv3_ parallel access

Anurag Jain anuragjain026 at hotmail.com
Tue Dec 11 17:31:26 CET 2007


Jochen,
 
We are seeing some issues with SNMPv3 and parallel concurrent snmpv3 access to v3 agents on network devices.
Scenario 1)
When two devices have the same user name ( e.g. MotoMaster ), and one device is running clear mode ( security level 1 ) and the other device is authpriv we see the case where one of the snmpv3 get fails due to invalid SNMP credentials
 
Scenario 2)
When two devices have the same user name ( e.g. MotoMaster ) and both are running authpriv, but the pass phrases for the user name on each device are different we see the case where one of the snmpv3 get fails due to invalid SNMP credentials.
 
 
Could this be correlated to the fix below related to the v3 pdu handler race condition fix (SNMPv3_MP_UNKNOWN_PDU_HANDLERS  problem below ) or some other bug could be causing this ?
 
OR (our usage explanation)
 
At this point in our library (that uses snmp++) we cache a unique snmpv3 credential (identified uniquely by : sec user user, auth protocol,privprotocol , privpass and auth password) in memory and add it to  to the USM only once per thread  so as not to insert the same credential multiple times into USM in the same thread of execution  , also each thread access the same snmpv3 agent only during its lifetime . Is this something that could cause the above problem in a multi threaded environment or is this the right way to proceed?
 
 
Thanks
Anurag
 
 
 
> Date: Tue, 13 Nov 2007 23:01:09 +0100> From: katz at agentpp.com> To: anuragjain026 at hotmail.com> CC: agentpp at agentpp.org> Subject: Re: [AGENT++] SNMPv3_MP_UNKNOWN_PDU_HANDLERS error> > Hello,> > > I am not sure we are gettng a TIMEOUT , we are actually being returned> > the status - SNMPv3_MP_UNKNOWN_PDU_HANDLERS,> > yes, I could verify this. There is a race condition in> Snmp::snmp_engine() function. First the request is sent and afterwards> the message is added to the list of outstanding requests. Therefore the> following can happen:> > Thread 1: send request> Thread 2: process response> v3MP deletes its state information> no entry in msg queue -> discard> Thread 1: add request to msg queue> Thread : resend message because of timeout> Thread : process response> no state information in v3MP -> unknown pdu handlers> Thread 1: returns unknown pdu handlers> > I'm attaching the patch for uxsnmp.cpp/h, but as it won't go through> mailman, list members have to wait for the next snapshot at> http://oosnmp.com/~katz/snapshot/> > Regards,> Jochen
_________________________________________________________________
Share life as it happens with the new Windows Live.
http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007


More information about the AGENTPP mailing list