mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
Before this change snmp_open(3) would always bind(2) client socket to a
random "/tmp/snmpXXXXXXXXXXXXXX" name. However, this binding is not
required for SOCK_STREAM transport. Also, any attempt to specify a
different name would fail, as open_client_local() would blindly rewrite
the name to the default.
Make this binding optional. If application had initialized
snmp_client.local_path, then try to bind to the specified pathname,
otherwise perform the random name binding only if we are in the
SOCK_DGRAM mode.
While here change snmp_client.local_path size to SUNPATHLEN, so that any
legitimate local socket name can be used. This requires library version
bump.
Note that this code has been broken by
|
||
|---|---|---|
| .. | ||
| libbsnmp | ||
| tests | ||
| Makefile | ||
| Makefile.inc | ||