Skip to content

Commit

Permalink
Merge pull request RIOT-OS#20243 from benpicco/gnrc_ipv6_nib_pl_set-r…
Browse files Browse the repository at this point in the history
…elax

gnrc/nib: allow prefix to be on-link without being used for address
  • Loading branch information
benpicco authored Jan 10, 2024
2 parents 5fa94b5 + 433438c commit bb4c4dd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sys/net/gnrc/network_layer/ipv6/nib/nib_pl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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;
}

Expand Down

0 comments on commit bb4c4dd

Please sign in to comment.