Merge branch 'V5-6-patches' into V5-7-patches
* V5-6-patches:
fix #2482 snmp response: Too long
diff --git a/snmplib/snmp_api.c b/snmplib/snmp_api.c
index 228ed86..191debf 100644
--- a/snmplib/snmp_api.c
+++ b/snmplib/snmp_api.c
@@ -4932,7 +4932,7 @@
* 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));