From: Francois-Xavier Le Bail Date: Mon, 22 Aug 2022 15:56:18 +0000 (+0200) Subject: IPv6: Add a check for the Jumbo Payload Hop-by-Hop option X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/bbcd77cdee2052c7f0d2fad0b34a96fb662f406c IPv6: Add a check for the Jumbo Payload Hop-by-Hop option --- diff --git a/print-ip6.c b/print-ip6.c index 2784401c..2f1183c0 100644 --- a/print-ip6.c +++ b/print-ip6.c @@ -351,6 +351,11 @@ ip6_print(netdissect_options *ndo, const u_char *bp, u_int length) return; } advance = hbhopt_process(ndo, cp, &found_jumbo, &payload_len); + if (payload_len == 0 && found_jumbo == 0) { + ND_PRINT("[No valid Jumbo Payload Hop-by-Hop option found]"); + nd_print_invalid(ndo); + return; + } if (advance < 0) { nd_pop_packet_info(ndo); return;