1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #8499 from miri64/gnrc_icmpv6_echo/fix/loopback

gnrc_icmpv6_echo: fix ping for loopback
This commit is contained in:
Koen Zandberg 2018-02-05 11:02:57 +01:00 committed by GitHub
commit ab1d02bc8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,7 +93,13 @@ void gnrc_icmpv6_echo_req_handle(gnrc_netif_t *netif, ipv6_hdr_t *ipv6_hdr,
pkt = hdr;
hdr = gnrc_netif_hdr_build(NULL, 0, NULL, 0);
((gnrc_netif_hdr_t *)hdr->data)->if_pid = netif->pid;
if (netif != NULL) {
((gnrc_netif_hdr_t *)hdr->data)->if_pid = netif->pid;
}
else {
/* ipv6_hdr->dst is loopback address */
((gnrc_netif_hdr_t *)hdr->data)->if_pid = KERNEL_PID_UNDEF;
}
LL_PREPEND(pkt, hdr);