HomeFreeBSD

sys/netinet6: Implement RFC 7217

Description

sys/netinet6: Implement RFC 7217

Implement RFC 7217 (A Method for Generating Semantically Opaque
Interface Identifiers with IPv6 Stateless Address Autoconfiguration
(SLAAC)) in our IPv6 stack.

A new ifconfig stableaddr flag is added to enable the feature on
interfaces, which defaults to on or off for new interfaces based
on the sysctl net.inet6.ip6.use_stableaddr (off by default, so
this commit causes no change in behavior with default settings).

The algorithm follows the RFC in its logic, using SHA256-HMAC as
the algorithm to derive addresses so as to provide code that can
be leveraged by future implentations of RFC 8981, leveraging the
hostuuid as the secret.

The source of the hostidentifier can be configured using the sysctl
net.inet6.ip6.stableaddr_netifsource, while the number of retries
generating a new address in case of collision can be configured
using the net.inet6.ip6.stableaddr_maxretries sysctl (default 3).

Documentation about all these flags is added to the ifconfig(8) man
page.

Reviewed by: cognet, glebius, hrs
Tested by: zarychtam@plan-b.pwste.edu.pl
Approved by: cognet, glebius
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D49681

Details

Provenance
madpilotAuthored on Sep 20 2025, 12:26 PM
Reviewer
cognet
Differential Revision
D49681: Implement IPv6 RFC 7217
Parents
rG174d5d9397c4: random: fxrng: Add an entry for RANDOM_RANDOMDEV to the source table
Branches
Unknown
Tags
Unknown