Bugs item #3519226, was opened at 2012-04-18 11:55
Message generated for change (Tracker Item Submitted) made by gregweb
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112694&aid=3519226&group_id=12694
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: agent
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Grégoire Weber (gregweb)
Assigned to: Nobody/Anonymous (nobody)
Summary: register_mib_priority/unregister_mib asymmetry in pass.c
Initial Comment:
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.).
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:
The priorities of all pass directives from the ``pass_free_config``
hook. The ``passthrus`` (a global) currently does not contain
the priority.
According to Robert Story [1] the way to go is to extend the
``extensible`` struct with the priority.
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
[1] https://sourceforge.net/mailarchive/message.php?msg_id=29124900
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112694&aid=3519226&group_id=12694
|