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