Skip to content

Commit

Permalink
gnrc_ipv6: use gnrc_netif_hdr_set_netif()
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed Jul 25, 2019
1 parent 716cbe3 commit 7b43a8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c
Expand Up @@ -232,7 +232,7 @@ static void _send_to_iface(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt)
const ipv6_hdr_t *hdr = pkt->next->data;

assert(netif != NULL);
((gnrc_netif_hdr_t *)pkt->data)->if_pid = netif->pid;
gnrc_netif_hdr_set_netif(pkt->data, netif);
if (gnrc_pkt_len(pkt->next) > netif->ipv6.mtu) {
DEBUG("ipv6: packet too big\n");
gnrc_icmpv6_error_pkt_too_big_send(netif->ipv6.mtu, pkt);
Expand Down
4 changes: 2 additions & 2 deletions sys/net/gnrc/network_layer/ipv6/nib/nib.c
Expand Up @@ -830,7 +830,7 @@ static void _send_delayed_nbr_adv(const gnrc_netif_t *netif,
if ((pkt = _check_release_pkt(pkt, payload)) == NULL) {
return;
}
((gnrc_netif_hdr_t *)pkt->data)->if_pid = netif->pid;
gnrc_netif_hdr_set_netif(pkt->data, netif);
LL_PREPEND(payload, pkt);
_evtimer_add(pkt, GNRC_IPV6_NIB_SND_NA, &nce->snd_na,
random_uint32_range(0, NDP_MAX_ANYCAST_MS_DELAY));
Expand Down Expand Up @@ -1196,7 +1196,7 @@ static bool _resolve_addr(const ipv6_addr_t *dst, gnrc_netif_t *netif,
queue_entry->pkt = NULL;
return false;
}
((gnrc_netif_hdr_t *)netif_hdr->data)->if_pid = netif->pid;
gnrc_netif_hdr_set_netif(netif_hdr->data, netif);
LL_PREPEND(queue_entry->pkt, netif_hdr);
}
gnrc_pktqueue_add(&entry->pktqueue, queue_entry);
Expand Down

0 comments on commit 7b43a8f

Please sign in to comment.