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

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