svn commit: r310591 - head/contrib/bsnmp/snmpd

Ngie Cooper ngie at FreeBSD.org
Mon Dec 26 11:11:32 UTC 2016


Author: ngie
Date: Mon Dec 26 11:11:30 2016
New Revision: 310591
URL: https://svnweb.freebsd.org/changeset/base/310591

Log:
  Update engine time using update_snmpd_engine_time(..)
  
  MFC after:	6 days
  X-MFC with:	r310498
  Sponsored by:	Dell EMC Isilon

Modified:
  head/contrib/bsnmp/snmpd/trap.c

Modified: head/contrib/bsnmp/snmpd/trap.c
==============================================================================
--- head/contrib/bsnmp/snmpd/trap.c	Mon Dec 26 11:06:41 2016	(r310590)
+++ head/contrib/bsnmp/snmpd/trap.c	Mon Dec 26 11:11:30 2016	(r310591)
@@ -464,7 +464,6 @@ static void
 snmp_create_v3_trap(struct snmp_pdu *pdu, struct target_param *target,
     const struct asn_oid *trap_oid)
 {
-	uint64_t etime;
 	struct usm_user *usmuser;
 
 	memset(pdu, 0, sizeof(*pdu));
@@ -487,14 +486,7 @@ snmp_create_v3_trap(struct snmp_pdu *pdu
 
 	pdu->nbindings = 2;
 
-	etime = (get_ticks() - start_tick)  / 100ULL;
-	if (etime < INT32_MAX)
-		snmpd_engine.engine_time = etime;
-	else {
-		start_tick = get_ticks();
-		set_snmpd_engine();
-		snmpd_engine.engine_time = start_tick;
-	}
+	update_snmpd_engine_time();
 
 	memcpy(pdu->engine.engine_id, snmpd_engine.engine_id,
 	    snmpd_engine.engine_len);


More information about the svn-src-head mailing list