File: fix-request-id-0.patch

package info (click to toggle)
net-snmp 5.9.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 38,720 kB
  • sloc: ansic: 282,878; perl: 17,704; sh: 12,151; makefile: 2,711; python: 734; xml: 663; pascal: 62; sql: 47
file content (16 lines) | stat: -rw-r--r-- 506 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: fix-request-id-0
Author: Net-SNMP Packaging Team <pkg-net-snmp-devel@lists.alioth.debian.org>
Reviewed-by: Craig Small <csmall@debian.org>
Last-Update: 2023-08-19
--- a/snmplib/snmp_api.c
+++ b/snmplib/snmp_api.c
@@ -5441,6 +5441,9 @@
         /*
          * No response expected...  
          */
+        if ((reqid == 0) && (pdu->command == SNMP_MSG_RESPONSE)) {
+            reqid = 2;
+        }
         if (reqid) {
             /*
              * Free v1 or v2 TRAP PDU iff no error