diff options
Diffstat (limited to 'net-analyzer/net-snmp/files/CVE-2008-6123.patch')
-rw-r--r-- | net-analyzer/net-snmp/files/CVE-2008-6123.patch | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/net-analyzer/net-snmp/files/CVE-2008-6123.patch b/net-analyzer/net-snmp/files/CVE-2008-6123.patch index 557d71b85539..b4b06f63e9f1 100644 --- a/net-analyzer/net-snmp/files/CVE-2008-6123.patch +++ b/net-analyzer/net-snmp/files/CVE-2008-6123.patch @@ -1,19 +1,6 @@ diff -Naur snmplib.orig/snmpUDPDomain.c snmplib/snmpUDPDomain.c --- snmplib.orig/snmpUDPDomain.c 2007-10-11 22:46:30.000000000 +0200 +++ snmplib/snmpUDPDomain.c 2009-07-10 23:41:37.000000000 +0200 -@@ -65,6 +65,12 @@ - #define INADDR_NONE -1 - #endif - -+#ifdef MSG_DONTWAIT -+#define NETSNMP_DONTWAIT MSG_DONTWAIT -+#else -+#define NETSNMP_DONTWAIT 0 -+#endif -+ - static netsnmp_tdomain udpDomain; - - typedef struct netsnmp_udp_addr_pair_s { @@ -104,12 +110,12 @@ char tmp[64]; to = (struct sockaddr_in *) &(addr_pair->remote_addr); @@ -30,21 +17,3 @@ diff -Naur snmplib.orig/snmpUDPDomain.c snmplib/snmpUDPDomain.c } return strdup(tmp); } -@@ -140,7 +146,7 @@ - msg.msg_control = &cmsg; - msg.msg_controllen = sizeof(cmsg); - -- r = recvmsg(s, &msg, 0); -+ r = recvmsg(s, &msg, NETSNMP_DONTWAIT); - - if (r == -1) { - return -1; -@@ -215,7 +221,7 @@ - #if defined(linux) && defined(IP_PKTINFO) - rc = netsnmp_udp_recvfrom(t->sock, buf, size, from, &fromlen, &(addr_pair->local_addr)); - #else -- rc = recvfrom(t->sock, buf, size, 0, from, &fromlen); -+ rc = recvfrom(t->sock, buf, size, NETSNMP_DONTWAIT, from, &fromlen); - #endif /* linux && IP_PKTINFO */ - if (rc < 0 && errno != EINTR) { - break; |