Page MenuHomeFreeBSD

libbsnmp: define SNMP_DEFAULT_LOCAL that matches default server config
ClosedPublic

Authored by glebius on Jun 26 2025, 7:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 14, 3:13 PM
Unknown Object (File)
Tue, Oct 14, 3:13 PM
Unknown Object (File)
Tue, Oct 14, 3:13 PM
Unknown Object (File)
Tue, Oct 14, 1:43 AM
Unknown Object (File)
Sat, Oct 11, 2:26 PM
Unknown Object (File)
Sat, Sep 27, 6:26 PM
Unknown Object (File)
Sep 10 2025, 12:42 PM
Unknown Object (File)
Sep 9 2025, 6:05 AM
Subscribers

Details

Summary

The default /etc/snmpd.config we install for decades has:

begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1
begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4

However, libbsnmp internally used DEFAULT_LOCAL set to
"/var/run/snmp.sock" (note missing "d") to fill server pathname in case if
API user didn't provide one. This results with default server config
never working with an application that uses default initializer. The
libbsnmptools has a workaround for that, it defines internally
SNMP_DEFAULT_LOCAL that matches /etc/snmpd.config.

Bring this all to an order:

  • Make a public define SNMP_DEFAULT_LOCAL in libbsnmp.
  • Point it to what /etc/snmpd.config has in.
  • Remove workaround from libbsnmptools.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable