]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-isakmp.c
Clean up comments.
[tcpdump] / print-isakmp.c
index 8ad8a60f73b4830f76938dbbce1de2f9f178e4a8..b7b05116d08ce304936349e6def529ce4869cff1 100644 (file)
@@ -635,8 +635,8 @@ ikev1_print(netdissect_options *ndo,
 #define MAXINITIATORS  20
 static int ninitiator = 0;
 union inaddr_u {
-       struct in_addr in4;
-       struct in6_addr in6;
+       nd_ipv4 in4;
+       nd_ipv6 in6;
 };
 static struct {
        cookie_t initiator;
@@ -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_packet_info(ndo);
        }
 #endif
 
@@ -2813,7 +2820,7 @@ static char *
 numstr(u_int x)
 {
        static char buf[20];
-       nd_snprintf(buf, sizeof(buf), "#%u", x);
+       snprintf(buf, sizeof(buf), "#%u", x);
        return buf;
 }