mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 22:43:50 +01:00
gnrc_icmpv6_echo: use gnrc_netif_hdr_set_netif() also for loopback
This commit is contained in:
parent
50a3238ee0
commit
cee1b7296d
@ -1019,7 +1019,7 @@ tftp_state _tftp_send(gnrc_pktsnip_t *buf, tftp_context_t *ctxt, size_t len)
|
||||
|
||||
return TS_FAILED;
|
||||
}
|
||||
((gnrc_netif_hdr_t *)netif_hdr->data)->if_pid = gnrc_netif_iter(NULL)->pid;
|
||||
gnrc_netif_hdr_set_netif(netif_hdr->data, gnrc_netif_iter(NULL));
|
||||
LL_PREPEND(ip, netif_hdr);
|
||||
}
|
||||
|
||||
|
||||
@ -98,14 +98,8 @@ void gnrc_icmpv6_echo_req_handle(gnrc_netif_t *netif, ipv6_hdr_t *ipv6_hdr,
|
||||
gnrc_pktbuf_release(pkt);
|
||||
return;
|
||||
}
|
||||
|
||||
if (netif != NULL) {
|
||||
gnrc_netif_hdr_set_netif(hdr->data, netif);
|
||||
}
|
||||
else {
|
||||
/* ipv6_hdr->dst is loopback address */
|
||||
((gnrc_netif_hdr_t *)hdr->data)->if_pid = KERNEL_PID_UNDEF;
|
||||
}
|
||||
/* (netif == NULL) => ipv6_hdr->dst is loopback address */
|
||||
gnrc_netif_hdr_set_netif(hdr->data, netif);
|
||||
|
||||
LL_PREPEND(pkt, hdr);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user