Hi, snmpd terminates on SIGHUP used to force reloading the configuration in case of pass directives is used with non default priorities (details see P.S.).
I'll seeking for pointers from you (the Net-SNMP community) on how the intended way of a fix may look like before I start implementing a patch. In favour of a hackish quick&dirty fix I'll prefer doing it in a way which has reasonable chances to be accepted by the Net-SNMP community. Problem Overview: The reason for the termination lies in the fact that the pass module allows to specify the priority which is only taken into account at registration time (in pass_parse_config) but not at de-registration time (in pass_free_config) which will result in a duplicate registration resulting in snmpd being terminated. A quick test showed that passing a priority of 255 at de-registration time (using unregister_mib_priority) workarounds the termination. What needs be fixed somehow: I'm looking for a way to reach the priorities of all pass directives from the ``pass_free_config`` hook. The ``passthrus`` (a global) currently does not contain the priority. Some initial ideas: a) extend the ``extensible`` struct with a priority: not sure if this in line with initial intention of ``extensible``; feels bad, as possibly to intrusive b) add new ``extensible_prio`` struct containing ``extensible`` by value plus a priority: local, not affecting Net-SNMP internals and other modules Grégoire Weber P.S.: Additional Details: Net-SNMP-Version: 5.7.1 (the asymmetriy exists since Fri Apr 29 15:56:13 2005 +0000 Rev 6f5fa7631f4f53b705d386f10926b5932f9e746a) Log: NET-SNMP version 5.7.1 restarted register_mib: unregistering iso.3.6.1.4.1.6368.3.4.1.1.1 register_mib: unload(iso.3.6.1.4.1.6368.3.4.1.1.1, [NIL]) Turning on AgentX master support. register_mib: registering "pass" at iso.3.6.1.4.1.6368.3.4.1.1.1 with context "" duplicate registration: MIB modules pass and pass (oid .1.3.6.1.4.1.6368.3.4.1.1.1). Pass directive in /etc/snmp/snmpd.conf: pass -p 255 .1.3.6.1.4.1.6368.3.4.1.1.1 /opt/sz/bin/snmp-maintenance-status File: agent/mibgroup/ucd-snmp/pass.c ------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders