Incorrect Time Stamp in V1/V2 Traps

Mike Perler Mperler____ss7-link.com
Tue Feb 27 21:59:17 CET 2001


Hello,

I am trying to set up Agent++ v3.4.2 as part of an evaluation to determine
what SNMP agent we will be using in our product.

While testing SNMP traps, I noticed that when I send a V1 or V2 trap using
the NotificationOriginator::generate function, the time stamp that is sent
in the trap is incorrect. The generate function eventually calls the
Snmp::trap function. Instead of using sysUpTime, this function retrieves the
current time, subtracts 946080000 seconds (30 years), and uses the result as
the time stamp.

I noticed that the NotificationOriginator::generate function does retrieve
the value of sysUpTime and insert it into a PDU object, but that object is
only used if _SNMPv3 is defined. I commented out this #define from both
config.h and agent++.h because I only want SNMPv2 support. Therefore, the
generate function is calling SnmpRequest::process_trap, which is building a
new PDU instead of using the one that it had already constructed.

Is this a bug in the NotificationOriginator, or is this intended behavior?
If the latter, what is the reason behind this?

Thank you,
Michael Perler
S-Link Corporation
mperler at ss7-link.com



More information about the AGENTPP mailing list