From 32d1cd93a169335e5629f63d55ccc11406009681 Mon Sep 17 00:00:00 2001 From: xnumad <34810600+xnumad@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:12:38 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8D=92Supress=20SLAAC=20trigger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Need to check for matching address rather than prefix because for a 6LN, the SLAAC prefix is never stored in the prefix list, since everything is considered off-link. --- sys/net/gnrc/network_layer/ipv6/nib/nib.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/net/gnrc/network_layer/ipv6/nib/nib.c b/sys/net/gnrc/network_layer/ipv6/nib/nib.c index 77da35e5d4a8d..9685cb453ac2f 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/nib.c +++ b/sys/net/gnrc/network_layer/ipv6/nib/nib.c @@ -1639,6 +1639,14 @@ static uint32_t _handle_pio(gnrc_netif_t *netif, const icmpv6_hdr_t *icmpv6, if (pio->flags & NDP_OPT_PI_FLAGS_A && pio->prefix_len == SLAAC_PREFIX_LENGTH +#if IS_ACTIVE(CONFIG_GNRC_IPV6_STABLE_PRIVACY) + && (gnrc_netif_ipv6_addr_pfx_idx(netif, &pio->prefix, pio->prefix_len) < 0) + /* if the prefix is already known, + * do not cause generation of a potentially different + * stable privacy address (keyword DAD_Counter). + * refer to https://datatracker.ietf.org/doc/html/rfc4862#section-5.5.3 d) + * */ +#endif ) { _auto_configure_addr(netif, &pio->prefix, pio->prefix_len); }