>>>>> On Sat, 4 Dec 2010 00:42:08 +0100, Claus Klein <[email protected]> 
>>>>> said:

CK> With this simple configuration, the v3 trap is not logged from
CK> snmptrapd.

Your test works as expected in the trunk right now and the 5.6 branch
right now.  So I think you have something else going on with your code
that you've likely modified?



Now, about the patch you proposed first.  You indicated yourself that
the patch didn't actually help you, right?

A few comments:

+          if (engineID) {   //FIXME: only if not NULL!
+            DEBUGMSGHEX(("usm", engineID, engineIDLen));
+          }

I think that's fine if we added a else{} block stating that an empty
engineID was found as a counter debug statement.

Mine:
   +          if (engineID) {
   +              DEBUGMSGHEX(("usm", engineID, engineIDLen));
   +          } else {
   +              DEBUGMSGTL(("usm", "Empty EngineID"));
   +          }

Note, however, that DEBUGMSGHEX actually should work just fine if passed
a null pointer.  I'm not suggesting it's wise to do, but as long as
engineIDLen is actually also 0 nothing bad should happen.  Now, if
engineIDLen > 0 then things could get weird.  I'd rather fix DEBUGMSGHEX
though.


For agent_trap.c: the PDU engineID is set internally to the library from
the session engineID.  Not only that, but if you *don't* set session
engineID then internally to the library probing will be done, which you
don't want.  So the code is correct as is.  The securityEngineid should
be set in the session (though it could be set in the PDU too, it's
easier to leave it up to the library).

You said there was two NULL issues you were fixing, but I only see one
in your patch unless you're referring to the memdup possibly failing
(which would be from a malloc failure).

-- 
Wes Hardaker
Please mail all replies to [email protected]

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to