Blame SOURCES/net-snmp-5.7.2-response-too-long.patch

b5ae06
diff -urNp old/snmplib/snmp_api.c new/snmplib/snmp_api.c
b5ae06
--- old/snmplib/snmp_api.c	2017-01-16 10:11:37.951994525 +0100
b5ae06
+++ new/snmplib/snmp_api.c	2017-01-16 10:18:42.284631137 +0100
b5ae06
@@ -4931,7 +4931,7 @@ _sess_async_send(void *sessp,
b5ae06
      * specified in the received PDU.  
b5ae06
      */
b5ae06
 
b5ae06
-    if (session->sndMsgMaxSize != 0 && length > session->sndMsgMaxSize) {
b5ae06
+    if (pdu->version == SNMP_VERSION_3 && session->sndMsgMaxSize != 0 && length > session->sndMsgMaxSize) {
b5ae06
         DEBUGMSGTL(("sess_async_send",
b5ae06
                     "length of packet (%lu) exceeds session maximum (%lu)\n",
b5ae06
                     (unsigned long)length, (unsigned long)session->sndMsgMaxSize));