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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user