From bb31fbd73711752eb6a7a6847b48322724a86ed6 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Fri, 10 Jan 2020 23:10:49 +0100 Subject: [PATCH] ip6: fix printing rx packet headers The call to ip6_debug_print needs to be moved before the next-header parsing code. See bug #56708 --- src/core/ipv6/ip6.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/ipv6/ip6.c b/src/core/ipv6/ip6.c index afa69f1b..f50e46f6 100644 --- a/src/core/ipv6/ip6.c +++ b/src/core/ipv6/ip6.c @@ -703,6 +703,10 @@ netif_found: /* Init header length. */ hlen = hlen_tot = IP6_HLEN; + 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)); + /* Move to payload. */ pbuf_remove_header(p, IP6_HLEN); @@ -1042,10 +1046,6 @@ netif_found: options_done: /* send to upper layers */ - 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)); - ip_data.current_ip_header_tot_len = hlen_tot; #if LWIP_RAW