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

gnrc_ipv6: don't dispatch encapsulated IPv6 headers in central function

Otherwise, an encapsulated IPv6 packet is handled twice. Once in the
central function, once in the specialized decapsulation.
parent 160ccbcf
No related branches found
No related tags found
No related merge requests found
......@@ -213,9 +213,11 @@ static void _dispatch_next_header(gnrc_pktsnip_t *current, gnrc_pktsnip_t *pkt,
{
#ifdef MODULE_GNRC_IPV6_EXT
const bool should_dispatch_current_type = ((current->type != GNRC_NETTYPE_IPV6_EXT) ||
(current->next->type == GNRC_NETTYPE_IPV6));
(current->next->type == GNRC_NETTYPE_IPV6)) &&
(current->type != GNRC_NETTYPE_IPV6);
#else
const bool should_dispatch_current_type = (current->next->type == GNRC_NETTYPE_IPV6);
const bool should_dispatch_current_type = (current->next->type == GNRC_NETTYPE_IPV6) &&
(current->type != GNRC_NETTYPE_IPV6);
#endif
DEBUG("ipv6: forward nh = %u to other threads\n", nh);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment