net-snmp: add early return when HostIP is unset
authorEric McDonald <redacted>
Sat, 7 Mar 2026 21:51:25 +0000 (13:51 -0800)
committerFlorian Eckert <redacted>
Wed, 11 Mar 2026 08:07:04 +0000 (09:07 +0100)
commit1215e7e87a3e1a2082bc1e55a1ee4e642976ed1a
tree9e131e0561aef9db109f3dcafa85125c6c9bdcd0
parent8033cfc287257ce2507999dd8ee332655cf554d5
net-snmp: add early return when HostIP is unset

snmpd_access_HostIP_add would write unintended output to the
config file if the HostIP option is not specified. Add an early
return to prevent writing in that case.

This is a breaking change for configs where HostIP is unset.
Previously, an empty HostIP option would result in a malformed
directive containing a bare /mask with no guaranteed newline, the
exact form of which depended on the values of other options.
Now, no directive is written.

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