From 16e8ef31453d3b81765b2401a8be6938b4846a1a Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Tue, 10 Oct 2023 13:44:16 +0200 Subject: [PATCH] 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 --- src/core/ipv6/ip6.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/ipv6/ip6.c b/src/core/ipv6/ip6.c index 90e90dda..2c25f8ad 100644 --- a/src/core/ipv6/ip6.c +++ b/src/core/ipv6/ip6.c @@ -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);