<feed xmlns='http://www.w3.org/2005/Atom'>
<title>packages/net/net-snmp/files, branch master</title>
<subtitle>Mirror of packages feed</subtitle>
<id>https://git.openwrt.org/feed/packages/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/feed/packages/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/'/>
<updated>2026-06-23T07:12:16Z</updated>
<entry>
<title>net-snmp: fix 'bad number' warning when engineidtype is unset</title>
<updated>2026-06-23T07:12:16Z</updated>
<author>
<name>Michael Pfeifroth</name>
</author>
<published>2026-06-22T15:05:07Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=d5a0672d6a015043f26eaa8585a824cecd2a72ee'/>
<id>urn:sha1:d5a0672d6a015043f26eaa8585a824cecd2a72ee</id>
<content type='text'>
Add a -n guard before the arithmetic comparison of engineidtype in
snmpd_engineid_add(). When the engineid UCI section exists but
engineidtype is not configured, the empty string is passed to
[ -ge ]/[ -le ] which causes 'sh: bad number' on every boot.

Signed-off-by: Michael Pfeifroth &lt;michael.pfeifroth@westermo.com&gt;
</content>
</entry>
<entry>
<title>net-snmp: fix service not restarting on config change</title>
<updated>2026-06-16T08:36:52Z</updated>
<author>
<name>Michael Pfeifroth</name>
</author>
<published>2026-05-28T09:10:11Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=849d51851b829dc5bf244afa0ec7b5a56155cdfe'/>
<id>urn:sha1:849d51851b829dc5bf244afa0ec7b5a56155cdfe</id>
<content type='text'>
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 &lt;michael.pfeifroth@westermo.com&gt;
</content>
</entry>
<entry>
<title>net-snmp: add distro extend using /etc/os-release</title>
<updated>2026-03-24T06:30:51Z</updated>
<author>
<name>Kamil Bienkiewicz</name>
</author>
<published>2026-03-19T09:34:37Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=3892e96152c9aee53f7918b550a87e18bcbdf871'/>
<id>urn:sha1:3892e96152c9aee53f7918b550a87e18bcbdf871</id>
<content type='text'>
Read PRETTY_NAME from /etc/os-release via /bin/sh for distro output.

Bump PKG_RELEASE to account for the package configuration change.

Signed-off-by: Kamil Bienkiewicz &lt;perceivalpercy@gmail.com&gt;
</content>
</entry>
<entry>
<title>net-snmp: fix newline when RestrictOID is neither yes nor no</title>
<updated>2026-03-11T08:07:04Z</updated>
<author>
<name>Eric McDonald</name>
</author>
<published>2026-03-07T22:29:16Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=136bff9a8e85755bdb132d741a8e2f5937d3ba57'/>
<id>urn:sha1:136bff9a8e85755bdb132d741a8e2f5937d3ba57</id>
<content type='text'>
snmpd_access_default_add, snmpd_access_HostName_add, and
snmpd_access_HostIP_add check if RestrictOID is `yes` or `no`
but fail to write a newline for other values of RestrictOID
(e.g., `true`, `false`) or if unset, corrupting the generated config.

Fix by using config_get_bool and restructuring to write either
a complete line or nothing. Also require RestrictedOID to be
non-empty when RestrictOID is enabled.

This is a breaking change for configs where RestrictOID is set
to a value that the old code did not match as `yes` (e.g., `true`,
`1`, `on`, `enabled`) but config_get_bool evaluates as true. In
practice, this is unlikely to affect existing installs unless a
user is unknowingly relying on unintended behavior or is deliberately
relying on the old code's non-standard boolean evaluation; this
latter case is considered unlikely by this commit's author. Configs
where RestrictOID is enabled but RestrictedOID is empty are also
affected; previously a directive with a trailing space was written,
now no directive is written.

Signed-off-by: Eric McDonald &lt;librick-openwrt@proton.me&gt;
</content>
</entry>
<entry>
<title>net-snmp: add early return when IPMask is unset</title>
<updated>2026-03-11T08:07:04Z</updated>
<author>
<name>Eric McDonald</name>
</author>
<published>2026-03-07T21:52:19Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=b6ff8c79b17baf31c3ef5253b762f2d4c42b853a'/>
<id>urn:sha1:b6ff8c79b17baf31c3ef5253b762f2d4c42b853a</id>
<content type='text'>
snmpd_access_HostIP_add would write unintended output to the
config file if the IPMask option is not specified. Add an early
return to prevent writing in that case.

This is a breaking change for configs where IPMask is unset.
Previously, an empty IPMask option would result in a malformed
directive containing a trailing slash 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 &lt;librick-openwrt@proton.me&gt;
</content>
</entry>
<entry>
<title>net-snmp: add early return when HostIP is unset</title>
<updated>2026-03-11T08:07:04Z</updated>
<author>
<name>Eric McDonald</name>
</author>
<published>2026-03-07T21:51:25Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=1215e7e87a3e1a2082bc1e55a1ee4e642976ed1a'/>
<id>urn:sha1:1215e7e87a3e1a2082bc1e55a1ee4e642976ed1a</id>
<content type='text'>
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 &lt;librick-openwrt@proton.me&gt;
</content>
</entry>
<entry>
<title>net-snmp: add early return when HostName is unset</title>
<updated>2026-03-11T08:07:04Z</updated>
<author>
<name>Eric McDonald</name>
</author>
<published>2026-03-07T21:50:13Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=8033cfc287257ce2507999dd8ee332655cf554d5'/>
<id>urn:sha1:8033cfc287257ce2507999dd8ee332655cf554d5</id>
<content type='text'>
snmpd_access_HostName_add would write unintended output to the
config file if the HostName option is not specified. Add an early
return to prevent writing in that case.

This is a breaking change for configs where HostName is unset.
Previously, an empty HostName option would result in a malformed
directive with a trailing space and 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 &lt;librick-openwrt@proton.me&gt;
</content>
</entry>
<entry>
<title>net-snmp: add early return when CommunityName is unset</title>
<updated>2026-03-11T08:07:04Z</updated>
<author>
<name>Eric McDonald</name>
</author>
<published>2026-03-07T21:48:14Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=dbd293d75186eba31e99f4a6feed5193b53107fc'/>
<id>urn:sha1:dbd293d75186eba31e99f4a6feed5193b53107fc</id>
<content type='text'>
snmpd_access_default_add, snmpd_access_HostName_add, and
snmpd_access_HostIP_add would write unintended output to the
config file if the CommunityName option is not specified. Add an
early return to each function to prevent writing in that case.

This is a breaking change for configs where CommunityName is
unset. Previously, an empty CommunityName option would result in
a malformed directive with a double space and 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 &lt;librick-openwrt@proton.me&gt;
</content>
</entry>
<entry>
<title>net-snmp: add early return when Mode is unset</title>
<updated>2026-03-11T08:07:04Z</updated>
<author>
<name>Eric McDonald</name>
</author>
<published>2026-03-07T21:45:22Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=c3862ec354ab7957a54bffc8af4fe2b27b84eb13'/>
<id>urn:sha1:c3862ec354ab7957a54bffc8af4fe2b27b84eb13</id>
<content type='text'>
snmpd_access_default_add, snmpd_access_HostName_add, and
snmpd_access_HostIP_add would write unintended output to the
config file if the Mode option is not specified. Add an early
return to each function to prevent writing in that case.

This is a breaking change for configs where Mode is unset.
Previously, an empty Mode option would result in a malformed
directive with a leading space and 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 &lt;librick-openwrt@proton.me&gt;
</content>
</entry>
<entry>
<title>net-snmp: fix literal string test in snmpd_sink_add</title>
<updated>2025-12-14T21:52:39Z</updated>
<author>
<name>Eric McDonald</name>
</author>
<published>2025-12-04T17:48:16Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=93983e5b2ad7bac5e384bdd6cdcf471bbfe3eb55'/>
<id>urn:sha1:93983e5b2ad7bac5e384bdd6cdcf471bbfe3eb55</id>
<content type='text'>
The function snmpd_sink_add() has a guard clause that tests the literal
string "section", not the variable value "$section".

The test `[ -n "section" ]` always evaluates to true because the string
literal "section" is non-empty, making the check useless.

This function is only called internally with hardcoded arguments, so the
bug has no actual impact currently. For the same reason, this change
should not break existing configurations. However, I think it should be
fixed so future callers do not have a false sense of security.

Signed-off-by: Eric McDonald &lt;librick-openwrt@proton.me&gt;
</content>
</entry>
</feed>
