Subagent contexts and SNMP-COMMUNITY-MIB

Mike Carr everythingsfree____hotmail.com
Wed Mar 20 16:28:18 CET 2002


Frank,

Thanks for putting me back on the right track for this but I think I've 
found another bug in the code...

With an entry in the SNMP-COIMMUNITY-MIB for converting a community name 
into the appropriate context it appears that when the 'translation' is 
performed the version from the original request (v1 in my case) is being 
carried over into the request that is then added into the list of requests 
to be processed - see RequestList::receive where a new 'Request' object is 
created and then add_request is called.

The consequence of this is that when the version of the request is checked 
to see if it's a v3 one and it's found not to be, then the context used to 
add the request to the pending list is empty because the actual context 
isn't copied over - see AgentXNode::get_request where the comparison 
req->get_snmp_version() == version3 is made and fails.

Subsequently this empty context is used to create a pending AgentXPdu in the 
list of queued requests - see MasterAgentXMib::add_get_subrequest - and is 
then sent to the subagent - see MasterAgentXMib::send_pending_ax and then 
AgentX::send_agentx.

When this gets received by the subagent it then fails since the context used 
in the comparison (which is empty) doesn't match the subagents context 
(which is 'subagent').


Hopefully this makes sense and I've understood things correctly.  My only 
problem is that it's not clear how this should be corrected.  Should the 
version from the original request be translated into a v3 one in the first 
place so that the later comparison works?  If not have you any ideas?

Thanks,
Mike


>From: Frank.Fock____t-online.de (Frank Fock)
>To: Mike Carr <everythingsfree____hotmail.com>
>CC: agentpp-dl at fock.de
>Subject: Re: Subagent contexts and SNMP-COMMUNITY-MIB
>Date: Tue, 19 Mar 2002 01:34:43 +0100
>
>Mike,
>
>You would query an agent configured with the SNMP-COMMUNITY-MIB
>as you would query any SNMPv1/v2c agent. No special options! For each
>context you want to query you will have to specify a different community.
>Which communities are mapped to which contexts is configured in the
>  SNMP-COMMUNITY-MIB. That's what it is for.
>
>Hope this helps.
>
>Best regards,
>Frank



_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com




More information about the AGENTPP mailing list