Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Dec 2016 11:11:31 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r310591 - head/contrib/bsnmp/snmpd
Message-ID:  <201612261111.uBQBBV0E057811@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612261111.uBQBBV0E057811>