mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
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.
This commit is contained in:
parent
880b3319db
commit
160ccbcf7e
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
Loading…
Reference in New Issue
Block a user