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 cb8b6b588a1741acce0723a17aa04185b50c7b6a..b2f7f308c0825959db4be01194d3312b1f8f3f7f 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 @@ -49,8 +49,7 @@ static size_t _fit(const gnrc_pktsnip_t *orig_pkt) sizeof(ipv6_hdr_t); if (netif_hdr) { - gnrc_netif_hdr_t *data = netif_hdr->data; - gnrc_netif_t *netif = gnrc_netif_get_by_pid(data->if_pid); + gnrc_netif_t *netif = gnrc_netif_hdr_get_netif(netif_hdr->data); pkt_len -= netif_hdr->size; DEBUG("gnrc_icmpv6_error: fitting to MTU of iface %u (%u)\n",