From 15f210e4e4809281ddc874d3b9362bc7141c9f31 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Tue, 22 Mar 2022 20:48:30 +0100 Subject: [PATCH] gnrc/nib: don't advertise /128 prefix for auto-configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A single IP address will be added as a /128 prefix. It makes sense to advertise it, as neighbors can then know that the address/prefix is on-link. It does however not make sense to advertise the prefix as suitable for auto-configuration. Co-authored-by: Fabian Hüßler --- sys/net/gnrc/network_layer/ipv6/nib/nib_pl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 720ee6a976..312e303b38 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/nib_pl.c +++ b/sys/net/gnrc/network_layer/ipv6/nib/nib_pl.c @@ -69,7 +69,9 @@ int gnrc_ipv6_nib_pl_set(unsigned iface, (ipv6_addr_match_prefix(&netif->ipv6.addrs[idx], pfx) >= pfx_len)) { dst->flags |= _PFX_ON_LINK; } - if (netif->ipv6.aac_mode & GNRC_NETIF_AAC_AUTO) { + + /* Auto-configuration only works if the prefix is more than a single address */ + if ((netif->ipv6.aac_mode & GNRC_NETIF_AAC_AUTO) && (pfx_len < 128)) { dst->flags |= _PFX_SLAAC; } #if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_6LBR) && IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C)