Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161954061
D55136.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D55136.diff
View Options
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -1008,24 +1008,28 @@
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 @@
.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
--- a/sys/netinet6/in6_ifattach.c
+++ b/sys/netinet6/in6_ifattach.c
@@ -158,7 +158,7 @@
}
-/**
+/*
* Get interface link level sockaddr
*/
static struct sockaddr_dl *
@@ -178,10 +178,10 @@
if (sdl->sdl_alen == 0)
continue;
- return sdl;
+ return (sdl);
}
- return NULL;
+ return (NULL);
}
/*
@@ -250,10 +250,10 @@
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 @@
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 @@
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 @@
/* 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 @@
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);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 9, 7:54 AM (20 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34881486
Default Alt Text
D55136.diff (3 KB)
Attached To
Mode
D55136: Fix style issues in code I committed to support RFC 7217
Attached
Detach File
Event Timeline
Log In to Comment