]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-dhcp-client: move comment to relevant place
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 12 Jun 2025 20:59:56 +0000 (05:59 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 13 Jun 2025 04:35:21 +0000 (13:35 +0900)
src/libsystemd-network/sd-dhcp-client.c

index c7565aec798e8082d5a0bbc0d55a85f569dcf201..f14fd09bf4855c28e700e9048ccb91252e764b5d 100644 (file)
@@ -1055,10 +1055,6 @@ static int client_send_discover(sd_dhcp_client *client) {
         if (r < 0)
                 return r;
 
-        /* We currently ignore:
-           The client SHOULD wait a random time between one and ten seconds to
-           desynchronize the use of DHCP at startup.
-         */
         r = dhcp_client_send_raw(client, discover, sizeof(DHCPPacket) + optoffset);
         if (r < 0)
                 return r;
@@ -2207,6 +2203,9 @@ int sd_dhcp_client_start(sd_dhcp_client *client) {
         if (client->last_addr && !client->anonymize)
                 client_set_state(client, DHCP_STATE_INIT_REBOOT);
 
+        /* We currently ignore:
+         * The client SHOULD wait a random time between one and ten seconds to desynchronize the use of
+         * DHCP at startup. */
         r = client_start(client);
         if (r >= 0)
                 log_dhcp_client(client, "STARTED on ifindex %i", client->ifindex);