diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-11-07 18:14:59 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-11-07 18:18:15 +0100 |
commit | 089362976c2a653a77f942bfeb3f61d0e180f078 (patch) | |
tree | 553324e64d5538f2d0226bdc45351ac57b07c206 /src/libsystemd-network | |
parent | coredumpctl: propagate SIGTERM to the debugger process (diff) | |
download | systemd-089362976c2a653a77f942bfeb3f61d0e180f078.tar.xz systemd-089362976c2a653a77f942bfeb3f61d0e180f078.zip |
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 808b65a08729caa268efd57c478285ee4912d5a3.
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r-- | src/libsystemd-network/sd-dhcp-client.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 8a94685ba7..bbe0b5227b 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -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: |