]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-dhcp-client: add a short comment about IPv6 only mode
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 19 Oct 2023 15:16:39 +0000 (00:16 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 20 Oct 2023 16:54:08 +0000 (01:54 +0900)
src/libsystemd-network/sd-dhcp-client.c

index 7e3690893710937dfbd0f295d56f0f4f593effab..d27609655f171237d6ece3b43630a4b603a5854a 100644 (file)
@@ -1906,6 +1906,13 @@ static int client_enter_bound(sd_dhcp_client *client, int notify_event) {
         client->start_delay = 0;
         (void) event_source_disable(client->timeout_resend);
 
+        /* RFC 8925 section 3.2
+         * If the client is in the INIT-REBOOT state, it SHOULD stop the DHCPv4 configuration process or
+         * disable the IPv4 stack completely for V6ONLY_WAIT seconds or until the network attachment event,
+         * whichever happens first.
+         *
+         * In the below, the condition uses REBOOTING, instead of INIT-REBOOT, as the client state has
+         * already transitioned from INIT-REBOOT to REBOOTING after sending a DHCPREQUEST message. */
         if (client->state == DHCP_STATE_REBOOTING && client->lease->ipv6_only_preferred_usec > 0) {
                 if (client->ipv6_acquired) {
                         log_dhcp_client(client,