diff --git a/sys/net/gnrc/network_layer/icmpv6/error/gnrc_icmpv6_error.c b/sys/net/gnrc/network_layer/icmpv6/error/gnrc_icmpv6_error.c index a6495a048c336d5284deceaa344a7413f4bfb4b8..2ea403fc63e81ebf3c50f57e39a4362820e8f7c8 100644 --- a/sys/net/gnrc/network_layer/icmpv6/error/gnrc_icmpv6_error.c +++ b/sys/net/gnrc/network_layer/icmpv6/error/gnrc_icmpv6_error.c @@ -51,6 +51,7 @@ static size_t _fit(const gnrc_pktsnip_t *orig_pkt) gnrc_netif_hdr_t *data = netif_hdr->data; gnrc_netif_t *netif = gnrc_netif_get_by_pid(data->if_pid); + pkt_len -= netif_hdr->size; DEBUG("gnrc_icmpv6_error: fitting to MTU of iface %u (%u)\n", netif->pid, netif->ipv6.mtu); return MIN(pkt_len, netif->ipv6.mtu - sizeof(ipv6_hdr_t));