After much much investigation figured out the solution ...

The engine time details are added to engine_time_list twice, once for the
local engine, and
ones for the remote or authoritative engine. The local engine time details
are added at
the time of argument parsing (at least in my case : snmpset). And engine
time details for
the authoritative engine is added during snmp session open call (snmp_open)
and its
done by snmpv3_engineID_probe.

It seem like somewhere in between version 5.2.1.2 and 5.4.2.1 snmp_sess_init
was updated to disable engine id probe (session->flags |=
SNMP_FLAGS_DONT_PROBE;), as a result of snmpv3_engineID_probe does nothing,
just returns, and so -Z options will never be used, the engineTime and
engineBoots will
always be zero the first time, on the second attempt this will be filled by
engine id discover process (i.e from the snmp-report values).

Problem can be fixed by doing one of the 2 patches given bellow, I prefer
the later, as I don't not know the implications of the first patch i,e.
"removing "session->flags |= SNMP_FLAGS_DONT_PROBE;" in session init.

Here are the patches to net-snmp-5.4.2.1 ...

>>>>>>>>>>>>>>>>>>> patch 1
*** 706,712 ****
      session->version = SNMP_DEFAULT_VERSION;
      session->securityModel = SNMP_DEFAULT_SECMODEL;
      session->rcvMsgMaxSize = SNMP_MAX_MSG_SIZE;
-     session->flags |= SNMP_FLAGS_DONT_PROBE;
  }


--- 706,711 ----
>>>>>>>>>>>>>>>>>>> patch 1


>>>>>>>>>>>>>>>>>>> patch 2
*** 1411,1416 ****
--- 1411,1417 ----

      session->rcvMsgMaxSize = slp->transport->msgMaxSize;

+     session->flags &= ~SNMP_FLAGS_DONT_PROBE;
      if (!snmpv3_engineID_probe(slp, in_session)) {
          snmp_sess_close(slp);
          return NULL;
>>>>>>>>>>>>>>>>>>> patch 2




On Wed, Jun 17, 2009 at 3:00 PM, chinmaya <chinm...@gmail.com> wrote:

> I am experimenting with latest net-snmp version 5.4.2.1, I use -Z option
> to set engine boots and engine times, looks like snmpset command does
> not take it; on the wire I see that both engine-boots, engine-time are set
> to 0.
>
> This was working for me in the previous version I used which is 5.2.1.2.
>
> Is this a known bug? Has anyone figured out a solution?
> Or
> do you know in which latest version of net-snmp it works?
>
> Thanks
> Chinmaya SN
>
>


--
chinmaya
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to