From nobody Mon Feb 16 17:30:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fF8t55L2Tz6S5Dk for ; Mon, 16 Feb 2026 17:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fF8t52Chzz3SqQ for ; Mon, 16 Feb 2026 17:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771263005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oz0iYDeJMDRCuXGqns2hXhdLSW+6bsePrEvYopA15PA=; b=Q+ZBveh4JiaMrCMvTtnyO8PBYQZCYFJYLZlK+2wKpMpSJpvgMLjmgq/UgA48Qr23pQFzIA VGga0ByAn/38fEyPBtpBJUHk5tcrbvfYeYydjvt9wT9+nWoadoOmADFgqwh1srh/92k+dG z0aEqfMrRtfXb00cI3uY3qgHHuiHoHQ+OepUbeMfciDMds/fO9+Sk3jxihBfhWLUouT1+B 3crK4YlGi5U5yZCkKQLA5q+raP1YyY2l47MmBRzXu/gF2s3YdQz02ppIe3xJcvkYVPSAEu wFy6e1vzvJgMowDXFPAdywr6aDRb83IZx07EQSfd6lM3F/GItzruhjytPdF26w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771263005; a=rsa-sha256; cv=none; b=WHg3QsHAon4uL9T4b95em1+J85z8BP32EN1baSViX415Qo42a23qYTE7rGHAlG4moImXB1 s6+IfYxQSCXi4IRngm8uepzHkJ7p8R3VXlVLQ0FHR46u9jpTfYvCuKyHmftGSpyGjekYSj wELzKT1+8D3tzocnQDlmbqljDpI3NvwuOnQ8zYoDOPS9U0uDNRjta5KJPtPxKfWD+CVyXv G8jT3oA9Be1+VxXAzgkmBRRqrQ/NHI6P0FeJbEb4IwP8NZuK/yGi4nmhdFdRx/sHjDH3gN fWyhqIbDjmRqecTzNkiVYwxOD2CBKiJaADzKgqvosa6uOMZv9Kfn9kHASwZ32A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771263005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oz0iYDeJMDRCuXGqns2hXhdLSW+6bsePrEvYopA15PA=; b=SgoPNNZNQ23JeIMw9tHr+KLIP63aITv9p/mGHWXXxMnT2t6R5P4H9S/2gGebhJP3K2yA12 Ou6HV4Lz10kBhBs7fHs60x9XOehikIkJTX+kFCveHAVJ5c+bB2jM1qiI2o0RoHdUWrYyuB zMv6Zc2IgnqiWlaRolfx2292gs1CEPf9Bw3ziOwQthc0fWUVhWkGI0hkp8DPGyzvPdswaL Lsyq/dtlRNagWpGgiUML+VTIOz/ULGpjYRg421z4SI4C5+Sx+bdvCQUj8owl2/5y2aOUhc OhtcNAOGxEKnoO36dWl+8+0KLP9d5uWO9CJ6MimzEWujE2ieMwh37nUdAoW2Tw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fF8t473b7zYq9 for ; Mon, 16 Feb 2026 17:30:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 315b7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 16 Feb 2026 17:30:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Guido Falsi Subject: git: 76cd2807fc3a - stable/15 - sys/netinet6: Fix ABI breakage introduced with RFC 7217 support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: madpilot X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 76cd2807fc3a686abf4f6e87705896a69315e943 Auto-Submitted: auto-generated Date: Mon, 16 Feb 2026 17:30:04 +0000 Message-Id: <6993541c.315b7.3f686a1f@gitrepo.freebsd.org> The branch stable/15 has been updated by madpilot: URL: https://cgit.FreeBSD.org/src/commit/?id=76cd2807fc3a686abf4f6e87705896a69315e943 commit 76cd2807fc3a686abf4f6e87705896a69315e943 Author: Guido Falsi AuthorDate: 2025-09-22 07:57:39 +0000 Commit: Guido Falsi CommitDate: 2026-02-16 17:27:04 +0000 sys/netinet6: Fix ABI breakage introduced with RFC 7217 support commit 31ec8b6407fdd5a87d70265762457c67ce618283 added a `dad_failures` variable to `struct nd_ifinfo`, which broke the netowrking ABI. This commit fixes it by moving such variable to `struct in6_ifextra` which is not a public interface, while `struct nd_ifinfo` is back in its original state. Thanks to kib, markj and glebious for their help and suggestions in solving this problem. Reported by: "Herbert J. Skuhra" Tested by: "Herbert J. Skuhra" Approved by: glebius Fixes: 31ec8b6407fdd5a87d70265762457c67ce618283 (cherry picked from commit 0ec13430c583830cc4d29640787e2d154b140e31) Reviewed by: glebius, kp, pouria, zlei Approved by: glebius, pouria Relnotes: yes Differential Revision: https://reviews.freebsd.org/D54382 --- sys/netinet6/in6.c | 3 +++ sys/netinet6/in6_ifattach.c | 2 +- sys/netinet6/in6_var.h | 2 ++ sys/netinet6/nd6.c | 4 ---- sys/netinet6/nd6.h | 1 - sys/netinet6/nd6_nbr.c | 6 +++--- sys/netinet6/nd6_rtr.c | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index bdee1eefaa3f..abb880e5c2c1 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -2629,6 +2629,8 @@ in6_domifattach(struct ifnet *ifp) COUNTER_ARRAY_ALLOC(ext->icmp6_ifstat, sizeof(struct icmp6_ifstat) / sizeof(uint64_t), M_WAITOK); + ext->dad_failures = counter_u64_alloc(M_WAITOK); + ext->nd_ifinfo = nd6_ifattach(ifp); ext->scope6_id = scope6_ifattach(ifp); ext->lltable = in6_lltattach(ifp); @@ -2664,6 +2666,7 @@ in6_domifdetach(struct ifnet *ifp, void *aux) COUNTER_ARRAY_FREE(ext->icmp6_ifstat, sizeof(struct icmp6_ifstat) / sizeof(uint64_t)); free(ext->icmp6_ifstat, M_IFADDR); + counter_u64_free(ext->dad_failures); free(ext, M_IFADDR); } diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 3152291cbe6a..538f34a267b4 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -378,7 +378,7 @@ in6_get_stableifid(struct ifnet *ifp, struct in6_addr *in6, int prefixlen) } hostuuid_len = strlen(hostuuid); - dad_failures = counter_u64_fetch(ND_IFINFO(ifp)->dad_failures); + dad_failures = counter_u64_fetch(DAD_FAILURES(ifp)); /* * RFC 7217 section 7 diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index e5ab83e6a2a1..e511ead24f08 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -106,9 +106,11 @@ struct in6_ifextra { struct scope6_id *scope6_id; struct lltable *lltable; struct mld_ifsoftc *mld_ifinfo; + counter_u64_t dad_failures; /* DAD failures when using RFC 7217 stable addresses */ }; #define LLTABLE6(ifp) (((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->lltable) +#define DAD_FAILURES(ifp) (((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->dad_failures) #ifdef _KERNEL diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 938d411711f0..00df5efcef92 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -329,8 +329,6 @@ nd6_ifattach(struct ifnet *ifp) nd->flags |= ND6_IFF_STABLEADDR; } - nd->dad_failures = counter_u64_alloc(M_WAITOK); - return nd; } @@ -350,8 +348,6 @@ nd6_ifdetach(struct ifnet *ifp, struct nd_ifinfo *nd) } NET_EPOCH_EXIT(et); - counter_u64_free(nd->dad_failures); - free(nd, M_IP6NDP); } diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index 4322066b0912..e484c709e29a 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -76,7 +76,6 @@ struct nd_ifinfo { u_int8_t randomseed0[8]; /* upper 64 bits of MD5 digest */ u_int8_t randomseed1[8]; /* lower 64 bits (usually the EUI64 IFID) */ u_int8_t randomid[8]; /* current random ID */ - counter_u64_t dad_failures; /* DAD failures when using RFC 7217 stable addresses */ }; #define ND6_IFF_PERFORMNUD 0x1 diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index 74f63ed6dfdc..e2db192bca15 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -1460,7 +1460,7 @@ nd6_dad_timer(void *arg) if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) == 0) { ia->ia6_flags &= ~IN6_IFF_TENTATIVE; if ((ND_IFINFO(ifp)->flags & ND6_IFF_STABLEADDR) && !(ia->ia6_flags & IN6_IFF_TEMPORARY)) - counter_u64_zero(ND_IFINFO(ifp)->dad_failures); + counter_u64_zero(DAD_FAILURES(ifp)); } nd6log((LOG_DEBUG, @@ -1509,10 +1509,10 @@ nd6_dad_duplicated(struct ifaddr *ifa, struct dadq *dp) * More addresses will be generated as long as retries are not exhausted. */ if ((ND_IFINFO(ifp)->flags & ND6_IFF_STABLEADDR) && !(ia->ia6_flags & IN6_IFF_TEMPORARY)) { - uint64_t dad_failures = counter_u64_fetch(ND_IFINFO(ifp)->dad_failures); + uint64_t dad_failures = counter_u64_fetch(DAD_FAILURES(ifp)); if (dad_failures <= V_ip6_stableaddr_maxretries) { - counter_u64_add(ND_IFINFO(ifp)->dad_failures, 1); + counter_u64_add(DAD_FAILURES(ifp), 1); /* if retries exhausted, output an informative error message */ if (dad_failures == V_ip6_stableaddr_maxretries) log(LOG_ERR, "%s: manual intervention required, consider disabling \"stableaddr\" on the interface" diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index 85046c0dd9fe..2ac883729c12 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -1709,7 +1709,7 @@ prelist_update(struct nd_prefixctl *new, struct nd_defrouter *dr, * to fail and no further retries should happen. */ if (ND_IFINFO(ifp)->flags & ND6_IFF_STABLEADDR && - counter_u64_fetch(ND_IFINFO(ifp)->dad_failures) <= V_ip6_stableaddr_maxretries && + counter_u64_fetch(DAD_FAILURES(ifp)) <= V_ip6_stableaddr_maxretries && ifa6->ia6_flags & (IN6_IFF_DUPLICATED | IN6_IFF_TEMPORARY)) continue;