Blame SOURCES/net-snmp-5.7.2-clientaddr-error-msg.patch

d9926c
1086925 - snmpd does not report error when clientaddr <ip>:<port> cannot bind to the specified port
d9926c
d9926c
commit 68d2c8fd4bf2390612f288ff488b7c08102bcd0a
d9926c
Author: Jan Safranek <jsafranek@users.sourceforge.net>
d9926c
Date:   Wed Jan 14 11:52:05 2015 +0100
d9926c
d9926c
    Added error message when bind for clientaddr fails.
d9926c
d9926c
diff --git a/snmplib/transports/snmpUDPIPv4BaseDomain.c b/snmplib/transports/snmpUDPIPv4BaseDomain.c
d9926c
index fa39e4b..b8b6683 100644
d9926c
--- a/snmplib/transports/snmpUDPIPv4BaseDomain.c
d9926c
+++ b/snmplib/transports/snmpUDPIPv4BaseDomain.c
d9926c
@@ -221,6 +221,8 @@ netsnmp_udpipv4base_transport(struct sockaddr_in *addr, int local)
d9926c
             if ( rc != 0 ) {
d9926c
                 DEBUGMSGTL(("netsnmp_udpbase", "failed to bind for clientaddr: %d %s\n",
d9926c
                             errno, strerror(errno)));
d9926c
+                snmp_log(LOG_ERR, "Cannot bind for clientaddr: %s\n",
d9926c
+                            strerror(errno));
d9926c
                 netsnmp_socketbase_close(t);
d9926c
                 netsnmp_transport_free(t);
d9926c
                 return NULL;