The branch main has been updated by madpilot:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=4548149a81026ad9b1706b2b7e7ad47a4c1358b6

commit 4548149a81026ad9b1706b2b7e7ad47a4c1358b6
Author:     Guido Falsi <[email protected]>
AuthorDate: 2026-02-07 12:46:05 +0000
Commit:     Guido Falsi <[email protected]>
CommitDate: 2026-02-07 12:46:05 +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
---
 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 c38fe90632f8..a952192b6b62 100644
--- a/sys/netinet6/in6_ifattach.c
+++ b/sys/netinet6/in6_ifattach.c
@@ -158,7 +158,7 @@ get_rand_ifid(struct ifnet *ifp, struct in6_addr *in6)
 }
 
 
-/**
+/*
  * Get interface link level sockaddr
  */
 static struct sockaddr_dl *
@@ -178,10 +178,10 @@ get_interface_link_level(struct ifnet *ifp)
                if (sdl->sdl_alen == 0)
                        continue;
 
-               return sdl;
+               return (sdl);
        }
 
-       return NULL;
+       return (NULL);
 }
 
 /*
@@ -250,10 +250,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
  *
@@ -268,7 +268,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)
@@ -314,7 +314,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);
 
@@ -375,7 +375,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';
        }
@@ -383,11 +383,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);
 

Reply via email to