Add support for the "IPv6-Only Preferred" DHCPv4 option
Summary
Add a new "ipv4.dhcp-ipv6-only" to control the "IPv6-Only Preferred" DHCPv4 option (RFC 8925).
Purpose
When deploying IPv6-only LANs, there might be hosts that are fully capable of operating as IPv6-only and other hosts that still require IPv4. The purpose of the "IPv6-Only Preferred" option is to provide IPv4 connectivity only to the hosts that need it. To achieve that, there is a form of negotiation where a IPv6-only capable host announce this capability by requesting the option; if the network also supports IPv6-only, it sets the option in the DHCP replies. When that happens, the host can disable IPv4 for the time interval indicated by the server. Clients that require IPv4 can ignore the option and operate normally.
Checklist
Please read https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md before opening the merge request. In particular, check that:
-
the subject for all commits is concise and explicative -
the message for all commits explains the reason for the change -
the source is properly formatted -
any relevant documentation is up to date -
you have added unit tests if applicable -
the NEWS file is updated when the change deserves to be mentioned, for example for new features, behavior changes, API deprecations, etc.