inet6: RFC 8981 SLAAC Temporary Address Extensions
Deprecate the use of MD5 as the algorithm for generating temporary
interface identifiers (IIDs) for IPv6 addresses, improving cryptographic
robustness.
Introduce per-address randomized IIDs, ensuring that each temporary
address uses a distinct interface identifier to enhance privacy and
avoid correlation across addresses.
Update the IID generation logic to respect the Reserved IPv6 Interface
Identifiers list.
Enhance sysctl_ip6_temppltime() so that ip6_temp_max_desync_factor is
dynamically recalculated whenever ip6_temp_preferred_lifetime is updated
via sysctl. This ensures that MAX_DESYNC_FACTOR remains approximately
1/32 of the preferred lifetime plus 10 minutes. DESYNC_FACTOR is also
regenerated after each update.
Timers related to temporary address regeneration were updated to match
the design recommendations in RFC 8981.
A new read-only sysctl variable net.inet6.ip6.temp_max_desync_factor
is introduced to expose the computed value of MAX_DESYNC_FACTOR to
userland for observability and debugging.
Input validation to reject temppltime values too small or too large is
included.
This all brings the temporary address lifetime handling closer to the
intended design in RFC 8981 and improves robustness against
misconfiguration.
PR: 245103
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D50108