Skip to content
Snippets Groups Projects
Commit 160ccbcf authored by Martine Lenders's avatar Martine Lenders
Browse files

gnrc_ipv6: don't recurse into receive for encapsulated IPv6

`_decapsulate()` is called by callees of `_receive()` so the call to
the latter function within the first creates a recursion we don't want.
Using `gnrc_netapi` instead removes that and provides the added benefit
that other subscribers to IPv6 are also informed.
parent 880b3319
No related branches found
No related tags found
No related merge requests found
......@@ -896,7 +896,10 @@ static void _decapsulate(gnrc_pktsnip_t *pkt)
pkt->type = GNRC_NETTYPE_IPV6;
_receive(pkt);
if (gnrc_netapi_dispatch_receive(GNRC_NETTYPE_IPV6,
GNRC_NETREG_DEMUX_CTX_ALL, pkt) == 0) {
gnrc_pktbuf_release(pkt);
}
}
/** @} */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment