--- ip6.c.orig 2020-05-04 19:20:03.439005126 +0200 +++ ip6.c 2020-05-04 19:56:52.310024675 +0200 @@ -1042,9 +1042,15 @@ options_done: /* send to upper layers */ +#if IP6_DEBUG + /* p points to IPv6 header again for raw_input. */ + pbuf_add_header_force(p, hlen_tot); LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: \n")); ip6_debug_print(p); LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len)); + /* Point to payload. */ + pbuf_remove_header(p, hlen_tot); +#endif ip_data.current_ip_header_tot_len = hlen_tot;