Date: Fri, 17 Apr 2026 22:58:49 +0000 From: Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: e80811906177 - main - nd6: Remove anycast check in prelist_update Message-ID: <69e2bb29.369f2.1aa91bb5@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=e8081190617741e348fc85f17ff90b066407fc0f commit e8081190617741e348fc85f17ff90b066407fc0f Author: Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org> AuthorDate: 2026-04-16 22:31:52 +0000 Commit: Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org> CommitDate: 2026-04-17 22:52:19 +0000 nd6: Remove anycast check in prelist_update RFC 2462 is obsoleted by RFC 4862 and it made statements more clear than before. Considering SLAAC can't create anycast addresses by itself, remove its check. While here, update comments based on RFC 4862. Reviewed by: markj, zlei Differential Revision: https://reviews.freebsd.org/D56134 --- sys/netinet6/nd6_rtr.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index a27df537ecdc..2a73007d5118 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -1613,14 +1613,13 @@ prelist_update(struct nd_prefixctl *new, struct nd_defrouter *dr, pfxrtr_add(pr, dr); /* - * 5.5.3 (d). If the prefix advertised is not equal to the prefix of + * 5.5.3 (d). If the prefix advertised is not equal to the prefix of * an address configured by stateless autoconfiguration already in the - * list of addresses associated with the interface, and the Valid - * Lifetime is not 0, form an address. We first check if we have - * a matching prefix. - * Note: we apply a clarification in rfc2462bis-02 here. We only - * consider autoconfigured addresses while RFC 4862 simply said - * "address". + * list of addresses associated with the interface (where "equal" + * means the two prefix lengths are the same and the first prefix-length + * bits of the prefixes are identical), + * and if the Valid Lifetime is not 0, form an address (and + * add it to the list). We first check if we have a matching prefix. */ CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { struct in6_ifaddr *ifa6; @@ -1630,21 +1629,9 @@ prelist_update(struct nd_prefixctl *new, struct nd_defrouter *dr, continue; ifa6 = (struct in6_ifaddr *)ifa; - - /* - * We only consider autoconfigured addresses as per rfc2462bis. - */ if (!(ifa6->ia6_flags & IN6_IFF_AUTOCONF)) continue; - /* - * Spec is not clear here, but I believe we should concentrate - * on unicast (i.e. not anycast) addresses. - * XXX: other ia6_flags? detached or duplicated? - */ - if ((ifa6->ia6_flags & IN6_IFF_ANYCAST) != 0) - continue; - /* * Ignore the address if it is not associated with a prefix * or is associated with a prefix that is different from thishome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69e2bb29.369f2.1aa91bb5>
