I've stumbled across some really peculiar error handling problems in
the agentx implementation in net-snmp 5.7.1, and was wondering if
anyone was familiar enough with this code to figure out what's going
on.

1. VarBinds of an unrecognized type get *stripped* from SET requests
aimed at the subagent.  E.g., if a manager sets two varbinds, one
using the long-obsolete UInteger32 type: {dot1qPvid.1 UInteger32 99}
{dot1qPvid.2 Unsigned32 42} the subagent only gets the second one, and
the master agent returns that success response to the manager, so the
manager has no indication that dot1qPvid.1 did not get set.
http://sourceforge.net/tracker/?func=detail&aid=3456334&group_id=12694&atid=112694

2. If the master agent fails to encode a SET message to the subagent,
it can then stop processing messages altogether, queueing them all to
process later because a SET request is pending.
http://sourceforge.net/tracker/?func=detail&aid=3456337&group_id=12694&atid=112694

3. If the subagent gets a request that it cannot parse (let's say the
master agent passes that UInteger32 type down, but the subagent can't
handle it), it simply ignores the whole AgentX PDU rather than
reporting an error to the master agent, so the master agent
disconnects the subagent for becoming unresponsive.
http://sourceforge.net/tracker/?func=detail&aid=3456342&group_id=12694&atid=112694

In theory, #3 can't happen with net-snmp as both master and subagent,
since the master and subagent PDU handlers are kept in sync, but it
could happen with a different master agent or if there is skew within
the agentx implementation when handling incorrect requests like this.

Now, I really don't care about the specific case of UInteger32: if a
manager wants to use a type that was deprecated in 1996, I don't want
to encourage them.  But, I don't want my agent to behave this
unpredictably because of it.

I spent some time trying to figure out the error handling mechanisms,
but I kept having a disconnect between functions that used 0 for
failure and 1 for success, vs. others that used NETSNMP_ERR_NOERROR=0
for success, and never really found where the translation happened.

Thanks for any help.

  Bill

------------------------------------------------------------------------------
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity 
while improving strategic productivity.  Learn More! 
http://www.accelacomm.com/jaw/sdnl/114/51507609/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to