I could not find this in the bug list.  Apologies if I have missed it.

When a subagent sends a message (e.g. registering a MIB portion) to the
AgentX master, it looks for its response by checking the PacketID of all
incoming packets.  If the PacketID matches, it assumes that it will be
the response to its own outgoing packet.  While in most cases this is
true, it is possible for the master to be also sending its own message
(e.g. an SNMP get for an already registered part of the MIB) and to
allocate the same PacketID value.  (Aside: the code stores the PacketID
in reqid)

When the subagent processes the response (in
agent/mibgroup/agentx/client.c::agentx_synch_input()), it does check to
see if the packet is a response...  
    state->waiting = 0;
    if (op == NETSNMP_CALLBACK_OP_RECEIVED_MESSAGE) {
        if (pdu->command == AGENTX_MSG_RESPONSE) {
However, if the pdu command is anything other than a response, the
incoming message is dropped.  As state->waiting has been set to zero,
the subagent will also give up on its own packet (I am not sure what
value state->status will have in this case).  

I am not sure what knock-on effects this will have.  I don't know if it
is related to 
http://sourceforge.net/tracker/index.php?func=detail&aid=1097029&group_id=12694&atid=112694


If pdu-> command is anything else, the code (in
agent/mibgroup/agentx/client.c::agentx_synch_input()) should call
handle_agentx_packet() and not set state->waiting = 0;  It would also be
nice if snmplib/snmp_client.c::snmp_synch_response_cb() initialised
state->status to a known value.

I am looking at version 5.4.2.1 of the source code.


Maurice Goodfellow 
Senior Design Engineer

Telsis Limited | Barnes Wallis Road Fareham PO15 5TT | UK
T: +44 (0)1489 76 00 00
E: [email protected] 
W: www.telsis.com





NOTICE & DISCLAIMER 
This email including attachments (this "Document") is confidential and may 
contain legally privileged information.  If you have received this Document in 
error please notify the sender immediately and delete this Document from your 
system without using, copying, disclosing or disseminating it or placing any 
reliance upon its contents.  We cannot accept liability for any breaches of 
confidence arising through use of this Document.

The information contained in this Document is provided solely for information 
purposes on an "as is" basis without warranty of any kind, either express or 
implied, including without limitation any implied warranty of satisfactory or 
merchantable quality, fitness for a particular purpose or freedom from error or 
infringement.  The user relies on the information contained herein, and its 
accuracy or otherwise, entirely at their own risk.

Any opinions expressed in this Document are those of the author and do not 
necessarily reflect the opinions of Telsis.  We will not accept responsibility 
for any commitments made by our employees outside the scope of our business.



<<attachment: logo.gif>>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to