Browse Source

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
Simon Goldschmidt 2 years ago
parent
commit
16e8ef3145
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/core/ipv6/ip6.c

+ 2 - 1
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);