net-snmp: fix service not restarting on config change
authorMichael Pfeifroth <redacted>
Thu, 28 May 2026 09:10:11 +0000 (11:10 +0200)
committerStijn Tintel <redacted>
Tue, 16 Jun 2026 08:36:52 +0000 (11:36 +0300)
commit849d51851b829dc5bf244afa0ec7b5a56155cdfe
tree0cda870dbfc093f84bc0d2c434c9a9f3b924dad8
parentb9395cbfeb268bd7538d1b0384bf8c47272a60f9
net-snmp: fix service not restarting on config change

snmpd generates its runtime configuration in /var/run/snmpd.conf from
UCI during start_service(). However, since the procd instance command
line never changes, procd does not detect that a restart is needed when
the UCI config is modified.

Add 'procd_set_param file /etc/config/snmpd' so procd tracks the config
file and restarts snmpd when it changes. Without this, 'reload_service'
(triggered by procd_add_reload_trigger) re-creates an identical instance
definition and procd skips the restart, leaving stale configuration
active.

This also fixes a usability issue with SNMPv3: when changing a user's
authentication or privacy algorithm, net-snmp must restart to re-derive
localized keys via createUser. Without the restart, the daemon keeps
using cached key material and authentication fails.

Tested with net-snmp 5.9.4 on OpenWrt (aarch64 and ppc64).

Signed-off-by: Michael Pfeifroth <redacted>
net/net-snmp/Makefile
net/net-snmp/files/snmpd.init
git clone https://git.99rst.org/PROJECT