diff --git a/src/core/ipv4/ip4.c b/src/core/ipv4/ip4.c index 0aef63c2..3ec50b66 100644 --- a/src/core/ipv4/ip4.c +++ b/src/core/ipv4/ip4.c @@ -470,7 +470,7 @@ ip_input(struct pbuf *p, struct netif *inp) ip_data.current_netif = inp; ip_data.current_ip4_header = iphdr; - ip_data.current_ip_header_tot_len = IPH_LEN(iphdr); + ip_data.current_ip_header_tot_len = IPH_HL(iphdr) * 4; #if LWIP_RAW /* raw input did not eat the packet? */