Re: CFV: complete fix for setting engineBoots/Time via cli

2018-05-17 Thread Niels Baggesen via Net-snmp-coders

Den 17-05-2018 kl. 13:48 skrev Robert Story:

A fix in pre2 or pre3 fixed use of -Z command line argument for
setting engineBoots/engineTime. The snmptrap app needs to be fixed
as well.

[PATCH] also fix snmptrap for setting engineBoots and engineTime (e.g. -Z cli 
arg)

An addendum for earlier fix for agent side (commit 988562514b05a2bc01be4)


+1

/Niels

--
Niels Baggesen - @home - Ã…rhus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


CFV: complete fix for setting engineBoots/Time via cli

2018-05-17 Thread Robert Story
A fix in pre2 or pre3 fixed use of -Z command line argument for
setting engineBoots/engineTime. The snmptrap app needs to be fixed
as well.

[PATCH] also fix snmptrap for setting engineBoots and engineTime (e.g. -Z cli 
arg)

An addendum for earlier fix for agent side (commit 988562514b05a2bc01be4)
---
 apps/snmptrap.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/apps/snmptrap.c b/apps/snmptrap.c
index b3c5a37a3..b495afb85 100644
--- a/apps/snmptrap.c
+++ b/apps/snmptrap.c
@@ -228,6 +228,14 @@ main(int argc, char *argv[])
 goto out;
 }

+if (ss->engineBoots != 0 || ss->engineTime != 0) {
+set_enginetime(ss->securityEngineID,
+   ss->securityEngineIDLen,
+   ss->engineBoots,
+   ss->engineTime,
+   TRUE);
+}
+
 #ifndef NETSNMP_DISABLE_SNMPV1
 if (session.version == SNMP_VERSION_1) {
 if (inform) {
--
2.14.3

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders