Skip to content

Commit

Permalink
Merge pull request #8499 from miri64/gnrc_icmpv6_echo/fix/loopback
Browse files Browse the repository at this point in the history
gnrc_icmpv6_echo: fix ping for loopback
  • Loading branch information
bergzand committed Feb 5, 2018
2 parents 7f0a7b1 + 12fad00 commit ab1d02b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sys/net/gnrc/network_layer/icmpv6/echo/gnrc_icmpv6_echo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ab1d02b

Please sign in to comment.