From nobody Mon Feb 16 17:30:07 2026 X-Original-To: dev-commits-src-branches@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 4fF8t74tsLz6S5B6 for ; Mon, 16 Feb 2026 17:30:07 +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 4fF8t71Xwqz3Skm for ; Mon, 16 Feb 2026 17:30:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771263007; 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=cFAIuBoxeN+i27//ZuQR9ozfmq70TpmZBKUCbEZ7agI=; b=Dge1zdpKb0iu9BX+NIVa0gSJUmTaXWyYUZ7gDH5hftSec1qhXbwnCSS35RdzpOSV7y+sIm crQ3jvF5Pa5GbIHsPsVJNT7N6kCzVx8vDIIspeF5iXlwpFIU0E0OGZMjn8OK4MwObq+5k0 +Qb+Qx2PKKrUlpN4JWgZijKfx3m7P7T0Dh55Z9Col4jmoxS8PClBxelw8xaiBY2zAyP4Z8 qQa2jxswYQ85EKeGgjYzKXS6Ugd+ZldfgrwwzunrcCxeBdUXO2QoEhNfnwoqlJANpHS5KC bs+6KR8H7X/w9KsUp1G5hL+Nat9Gc9ZmW5xcuvmo0OFOs/9eYp/zXsCOglYswg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771263007; a=rsa-sha256; cv=none; b=Ff38+yOKQ5qc0+lRssv0QYK0nsfHRMPpYQAUjxM6YmgHd1IWtyBglhKnwrGiQ9iiIs0C5v NVsrQBzFJHDcaR2QQS0Fn519aQgv4S3h1Dl7+dlTYHQ2WEO9pID/YJZhrcc4bAOfA7pwGA sqRek4O3M4Lx2ZOrX0PQQD3GfCxj1NPuO53gLFeoppqyt7T8w5PL2lavca0Zc2B1s6hdga 41Mk9RhSp5MFBZxrMLfj7ps7gZq18DZG9HOgBTQ8JucRyaJt1mXa14RAwOkgQOhhbzGDm9 V/+U9mqfCbp3X7Ir4q3e9a/o8o1c0xRTns6pofuFZNi8m3lBY3cE3PL6I8l3BA== 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=1771263007; 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=cFAIuBoxeN+i27//ZuQR9ozfmq70TpmZBKUCbEZ7agI=; b=FQzw9VCjE0TG7OdDidFsdjeNowFCEkg6+G+ZGP6vj3sx/pOQQtUJyga9hpHpldV28e8sij 1VjZTZGIG1CRuRZcpyn7+qUz6Hj4/XJmXkgbe5thDbqGoPwkGXH2P4Szfj52OeEzrHbe1M Exw146WkdZavs8m5Du6G1Ib4ZEcEEe5OR58y/tw4kxjf1Gb+z094c/mghcoiZQSeRgDWhZ JhcwdqB/klezHpjn6VlLCkM6Mt9TfdMN8mVpUixvR6iBlEnhiA5/WxDrWt6rNyHuzr4sto lXhJNcwoqInreRepDaBVxBbBGavJ7horuzu+We6baU7cntWPmtHBcUxFr81v7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fF8t70zsYzZ0M for ; Mon, 16 Feb 2026 17:30:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33105 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 16 Feb 2026 17:30:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Guido Falsi Subject: git: 20294a77a8d4 - stable/15 - netinet6: Fix my style issues List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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: 20294a77a8d40bb645efad4b365ddaa9e7a53db2 Auto-Submitted: auto-generated Date: Mon, 16 Feb 2026 17:30:07 +0000 Message-Id: <6993541f.33105.4e8d4552@gitrepo.freebsd.org> The branch stable/15 has been updated by madpilot: URL: https://cgit.FreeBSD.org/src/commit/?id=20294a77a8d40bb645efad4b365ddaa9e7a53db2 commit 20294a77a8d40bb645efad4b365ddaa9e7a53db2 Author: Guido Falsi AuthorDate: 2026-02-07 12:46:05 +0000 Commit: Guido Falsi CommitDate: 2026-02-16 17:28:04 +0000 netinet6: Fix my style issues Reported by: pouria Reviewed by: pouria, ziaee, glebius Approved by: glebius Fixes: 31ec8b6407fdd5a87d70265762457c67ce618283 Differential Revision: https://reviews.freebsd.org/D55136 (cherry picked from commit 4548149a81026ad9b1706b2b7e7ad47a4c1358b6) Reviewed by: glebius, kp, pouria, zlei Approved by: glebius, pouria Relnotes: yes Differential Revision: https://reviews.freebsd.org/D54382 --- sbin/ifconfig/ifconfig.8 | 19 +++++++++++-------- sys/netinet6/in6_ifattach.c | 22 +++++++++------------- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index 627b7cd3f9e3..e1d153aa7493 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -1008,24 +1008,28 @@ Set a flag to disable Duplicate Address Detection. Clear a flag .Cm no_dad . .It Cm stableaddr -Set a flag to create SLAAC addresses using a stable algorithm according to RFC 7217 -The +Set a flag to create SLAAC addresses using a stable algorithm +according to RFC 7217. The .Xr sysctl 8 variable .Va net.inet6.ip6.use_stableaddr -controls whether this flag is set by default or not for newly created interfaces. -To get consistent defaults for interfaces created at boot it should be set as a tunable via loader.conf(8). +controls whether this flag is set by default +or not for newly created interfaces. +To get consistent defaults for interfaces created at boot +it should be set as a tunable via +.Xr loader.conf 8 . The .Xr sysctl 8 variable .Va net.inet6.ip6.stableaddr_maxretries -sets the maximum number of retries to generate a unique IPv6 address to be performed in case of DAD failures. +sets the maximum number of retries to generate a unique IPv6 address +to be performed in case of DAD failures. This defaults to 3 which is also the reccommended minimum value. The interface ID source can be configured using the .Xr sysctl 8 variable -.Va net.inet6.ip6.stableaddr_netifsource: -.Bl -tag -compact +.Va net.inet6.ip6.stableaddr_netifsource : +.Bl -tag -compact -width indent .It Cm 0 uses the interface name string (the default) .It Cm 1 @@ -1033,7 +1037,6 @@ uses the interface ID .It Cm 2 uses the MAC address of the interface (if one can be obtained for it) .El -.Pp .It Cm -stableaddr Clear the flag .Cm stableaddr . diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index b487c80a6667..c9e951e93ec8 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -157,7 +157,7 @@ get_rand_ifid(struct ifnet *ifp, struct in6_addr *in6) } -/** +/* * Get interface link level sockaddr */ static struct sockaddr_dl * @@ -177,10 +177,10 @@ get_interface_link_level(struct ifnet *ifp) if (sdl->sdl_alen == 0) continue; - return sdl; + return (sdl); } - return NULL; + return (NULL); } /* @@ -249,10 +249,10 @@ in6_get_interface_hwaddr(struct ifnet *ifp, size_t *len) return (NULL); } - return addr; + return (addr); } - /* +/* * Get interface identifier for the specified interface. * XXX assumes single sockaddr_dl (AF_LINK address) per an interface * @@ -267,7 +267,7 @@ in6_get_hw_ifid(struct ifnet *ifp, struct in6_addr *in6) hwaddr = in6_get_interface_hwaddr(ifp, &hwaddr_len); if (hwaddr == NULL || (hwaddr_len != 6 && hwaddr_len != 8)) - return -1; + return (-1); /* make EUI64 address */ if (hwaddr_len == 8) @@ -313,7 +313,7 @@ validate_ifid(uint8_t *iid) static uint8_t reserved_eth[5] = { 0x02, 0x00, 0x5E, 0xFF, 0xFE }; static uint8_t reserved_anycast[7] = { 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; - /* Subnet-Router Anycast (RFC 4291)*/ + /* Subnet-Router Anycast (RFC 4291) */ if (memcmp(iid, allzero, 8) == 0) return (false); @@ -374,7 +374,7 @@ in6_get_stableifid(struct ifnet *ifp, struct in6_addr *in6, int prefixlen) /* Use hostuuid as constant "secret" key */ getcredhostuuid(curthread->td_ucred, hostuuid, sizeof(hostuuid)); if (strncmp(hostuuid, DEFAULT_HOSTUUID, sizeof(hostuuid)) == 0) { - // If hostuuid is not set, use a random value + /* If hostuuid is not set, use a random value */ arc4rand(hostuuid, HOSTUUIDLEN, 0); hostuuid[HOSTUUIDLEN] = '\0'; } @@ -382,11 +382,7 @@ in6_get_stableifid(struct ifnet *ifp, struct in6_addr *in6, int prefixlen) dad_failures = atomic_load_int(&DAD_FAILURES(ifp)); - /* - * RFC 7217 section 7 - * - * default max retries - */ + /* RFC 7217 section 7, default max retries */ if (dad_failures > V_ip6_stableaddr_maxretries) return (false);