|
|
8b097a |
diff -urNp a/snmplib/snmp_api.c b/snmplib/snmp_api.c
|
|
|
8b097a |
--- a/snmplib/snmp_api.c 2020-11-26 11:05:51.084788775 +0100
|
|
|
8b097a |
+++ b/snmplib/snmp_api.c 2020-11-26 11:08:27.850751397 +0100
|
|
|
8b097a |
@@ -235,7 +235,7 @@ static const char *api_errors[-SNMPERR_M
|
|
|
8b097a |
"No error", /* SNMPERR_SUCCESS */
|
|
|
8b097a |
"Generic error", /* SNMPERR_GENERR */
|
|
|
8b097a |
"Invalid local port", /* SNMPERR_BAD_LOCPORT */
|
|
|
8b097a |
- "Unknown host", /* SNMPERR_BAD_ADDRESS */
|
|
|
8b097a |
+ "Invalid address", /* SNMPERR_BAD_ADDRESS */
|
|
|
8b097a |
"Unknown session", /* SNMPERR_BAD_SESSION */
|
|
|
8b097a |
"Too long", /* SNMPERR_TOO_LONG */
|
|
|
8b097a |
"No socket", /* SNMPERR_NO_SOCKET */
|
|
|
8b097a |
@@ -1662,7 +1662,9 @@ _sess_open(netsnmp_session * in_session)
|
|
|
8b097a |
DEBUGMSGTL(("_sess_open", "couldn't interpret peername\n"));
|
|
|
8b097a |
in_session->s_snmp_errno = SNMPERR_BAD_ADDRESS;
|
|
|
8b097a |
in_session->s_errno = errno;
|
|
|
8b097a |
- snmp_set_detail(in_session->peername);
|
|
|
8b097a |
+ if (!netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID,
|
|
|
8b097a |
+ NETSNMP_DS_LIB_CLIENT_ADDR))
|
|
|
8b097a |
+ snmp_set_detail(in_session->peername);
|
|
|
8b097a |
return NULL;
|
|
|
8b097a |
}
|
|
|
8b097a |
|
|
|
abc426 |
diff -ruNp a/snmplib/transports/snmpUDPIPv4BaseDomain.c b/snmplib/transports/snmpUDPIPv4BaseDomain.c
|
|
|
abc426 |
--- a/snmplib/transports/snmpUDPIPv4BaseDomain.c 2021-01-06 12:51:51.948106797 +0100
|
|
|
abc426 |
+++ b/snmplib/transports/snmpUDPIPv4BaseDomain.c 2021-01-06 14:17:31.029745744 +0100
|
|
|
abc426 |
@@ -209,6 +209,8 @@ netsnmp_udpipv4base_transport_bind(netsn
|
|
|
abc426 |
DEBUGMSGTL(("netsnmp_udpbase",
|
|
|
abc426 |
"failed to bind for clientaddr: %d %s\n",
|
|
|
abc426 |
errno, strerror(errno)));
|
|
|
abc426 |
+ NETSNMP_LOGONCE((LOG_ERR, "Cannot bind for clientaddr: %s\n",
|
|
|
abc426 |
+ strerror(errno)));
|
|
|
abc426 |
netsnmp_socketbase_close(t);
|
|
|
abc426 |
return 1;
|
|
|
abc426 |
}
|