#ifdef HAVE_LIBCRYPTO
np = GET_U_1(ext->np);
- /* try to decypt it! */
+ /* try to decrypt it! */
if(esp_print_decrypt_buffer_by_ikev2(ndo,
GET_U_1(base->flags) & ISAKMP_FLAG_I,
base->i_ck, base->r_ck,
/* 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
void
isakmp_rfc3948_print(netdissect_options *ndo,
const u_char *bp, u_int length,
- const u_char *bp2)
+ const u_char *bp2, int ver, int fragmented, u_int ttl_hl)
{
ndo->ndo_protocol = "isakmp_rfc3948";
ND_TCHECK_1(bp);
/* must be an ESP packet */
{
- u_int nh, enh, padlen;
- int advance;
-
ND_PRINT("UDP-encap: ");
- advance = esp_print(ndo, bp, length, bp2, &enh, &padlen);
- if(advance <= 0)
- return;
+ esp_print(ndo, bp, length, bp2, ver, fragmented, ttl_hl);
- bp += advance;
- length -= advance + padlen;
- nh = enh & 0xff;
-
- ip_inner_print(ndo, bp, length, nh, bp2);
+ /*
+ * Either this has decrypted the payload and
+ * printed it, in which case there's nothing more
+ * to do, or it hasn't, in which case there's
+ * nothing more to do.
+ */
return;
}