From 74c102d7e9e04695476ca7fe1cec088a938ffb11 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 20 Oct 2023 00:16:39 +0900 Subject: [PATCH] sd-dhcp-client: add a short comment about IPv6 only mode --- src/libsystemd-network/sd-dhcp-client.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 7e36908937..d27609655f 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -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, -- 2.25.1