diff --git a/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c b/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c index 5f91029ec104441af5d0d11c2bd685e578a17a3e..255095f6391b52faa632881a6508685fb066ff77 100644 --- a/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c +++ b/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c @@ -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);