From 433438c9242ff44f01f5ceea59f1e6266ed7ffb6 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 10 Jan 2024 14:49:03 +0100 Subject: [PATCH] gnrc/nib: allow prefix to be on-link without being used for address --- sys/net/gnrc/network_layer/ipv6/nib/nib_pl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/net/gnrc/network_layer/ipv6/nib/nib_pl.c b/sys/net/gnrc/network_layer/ipv6/nib/nib_pl.c index 312e303b38..b7abefa17b 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/nib_pl.c +++ b/sys/net/gnrc/network_layer/ipv6/nib/nib_pl.c @@ -52,7 +52,6 @@ int gnrc_ipv6_nib_pl_set(unsigned iface, } #ifdef MODULE_GNRC_NETIF gnrc_netif_t *netif = gnrc_netif_get_by_pid(iface); - int idx; if (netif == NULL) { _nib_release(); @@ -64,9 +63,7 @@ int gnrc_ipv6_nib_pl_set(unsigned iface, * address resolution towards the LoWPAN and not the upstream interface * See https://github.com/RIOT-OS/RIOT/pull/10627 and follow-ups */ - if ((!gnrc_netif_is_6ln(netif) || gnrc_netif_is_6lbr(netif)) && - ((idx = gnrc_netif_ipv6_addr_match(netif, pfx)) >= 0) && - (ipv6_addr_match_prefix(&netif->ipv6.addrs[idx], pfx) >= pfx_len)) { + if (!gnrc_netif_is_6ln(netif) || gnrc_netif_is_6lbr(netif)) { dst->flags |= _PFX_ON_LINK; }