sd-dhcp-client: unconditionally set sd_dhcp_client.request_sent when a packet is sent

If a server replies an ACK for the initial DISCOVER, previously
request_sent was not set, so networkd handle the lease timed out.

Follow-up for 808b65a087.
This commit is contained in:
Yu Watanabe
2023-11-08 02:18:15 +09:00
parent b2603465d4
commit 089362976c
+2 -3
View File
@@ -1367,6 +1367,7 @@ static int client_timeout_resend(
} else if (client->attempt >= client->max_attempts)
goto error;
client->request_sent = time_now;
break;
case DHCP_STATE_SELECTING:
@@ -1374,9 +1375,7 @@ static int client_timeout_resend(
if (r < 0 && client->attempt >= client->max_attempts)
goto error;
if (client->rapid_commit)
client->request_sent = time_now;
client->request_sent = time_now;
break;
case DHCP_STATE_INIT_REBOOT: