]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-isakmp.c
Introduce a buffer stack, and use it for ESP decryption.
[tcpdump] / print-isakmp.c
index 8ad8a60f73b4830f76938dbbce1de2f9f178e4a8..1f1cd1bb987bc74f479ce01e9418103af8e5a1f2 100644 (file)
@@ -2697,6 +2697,13 @@ ikev2_e_print(netdissect_options *ndo,
                /* got it decrypted, print stuff inside. */
                ikev2_sub_print(ndo, base, np, ext,
                                ndo->ndo_snapend, phase, doi, proto, depth+1);
+
+               /*
+                * esp_print_decrypt_buffer_by_ikev2 pushed information
+                * on the buffer stack; we're done with the buffer, so
+                * pop it (which frees the buffer)
+                */
+               nd_pop_buffer(ndo);
        }
 #endif