ip-packet: Properly skip IPv6 fragment headers

Only skip the header, the `ip6e_len` field is reserved in these headers
and does not represent the length (I guess it's usually 0, but still).

Fixes: bdcaca76c5 ("ip-packet: Correctly determine protocol in fragmented IPv6 packets")
This commit is contained in:
Tobias Brunner
2026-07-24 08:47:36 +02:00
parent 2eeb8965ed
commit c3b99c6982
+4 -1
View File
@@ -247,7 +247,10 @@ static bool parse_transport_header_v6(struct ip6_hdr *ip, chunk_t packet,
{
case 44: /* Fragment Header */
fragment = TRUE;
/* skip the header */
ext = (struct ip6_ext*)payload->ptr;
*proto = ext->ip6e_nxt;
*payload = chunk_skip(*payload, 8);
continue;
case 0: /* Hop-by-Hop Options Header */
case 43: /* Routing Header */
case 60: /* Destination Options Header */