ipv6: fix ip6_current_header() after reassembly

ip6_current_header() should point to the header before the reassembled data,
not to the first received pbuf (not necessarily the same).

See bug #64031
This commit is contained in:
Simon Goldschmidt 2023-10-10 13:44:16 +02:00
parent 76c7ac5cf9
commit 16e8ef3145

View File

@ -1011,9 +1011,10 @@ netif_found:
goto ip6_input_cleanup;
}
/* Returned p point to IPv6 header.
/* Returned p points to IPv6 header.
* Update all our variables and pointers and continue. */
ip6hdr = (struct ip6_hdr *)p->payload;
ip_data.current_ip6_header = ip6hdr;
nexth = &IP6H_NEXTH(ip6hdr);
hlen = hlen_tot = IP6_HLEN;
pbuf_remove_header(p, IP6_HLEN);