Sorry to bring this up again; previously it was revealed that an
"snmp.conf" option "16bitIDs yes" will cause net-snmp to use 16-bit
RequestIDs to prevent "bad" SNMP agents from throwing a fit if the
RequestID is too high (the default is 31-bit) according to the
following code:
if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID,
NETSNMP_DS_LIB_16BIT_IDS))
return (retVal & 0x7fff); /* mask to 15 bits */
else
return (retVal & 0x7fffffff); /* mask to 31 bits */
However, completely unexpected was that, after enabling this option
and restarting our main daemon [that uses the net-snmp library], our
daemon crashed repeatedly and quickly (between seconds to 20-ish
minutes). This crash appears to have been caused by
"snmp_sess_synch_response" suddenly (and seemingly randomly) returning
a "1" [STAT_ERROR]; prior to turning on that option, this was never
returned. After the STAT_ERROR is returned, attempting to close the
SNMP session crashes our daemon.
If we remove "16bitIDs yes" from "snmp.conf", the daemon stops
crashing and never prints out that it got a STAT_ERROR.
This made absolutely no sense to me and I almost never caught it, but
it was the only possibility left after reverting all of our code
changes.
Has anyone had any issues with this? Is there a known problem with
"netsnmp_ds_get_boolean" when the boolean is actually set? We're
locked in to using net-snmp 5.4.2.1 for the immediate future (but we
will be able to test again with net-snmp 5.4.3 in the next month).
Original "snmp.conf":
mibs ALL
Strangely-broken "snmp.conf":
mibs ALL
16bitIDs yes
Thanks,
Doug
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders