1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-26 06:53:52 +01:00

Merge pull request #20243 from benpicco/gnrc_ipv6_nib_pl_set-relax

gnrc/nib: allow prefix to be on-link without being used for address
This commit is contained in:
benpicco 2024-01-10 22:19:03 +00:00 committed by GitHub
commit bb4c4ddf20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}