mirror of
https://github.com/systemd/systemd.git
synced 2024-10-28 03:25:31 +03:00
dhcp4: only renewing lease when the client already has a lease
Follow-up for ceaec54a3c
.
Hopefully fixes #16299.
This commit is contained in:
parent
330f899079
commit
0ded0e40ab
@ -2015,7 +2015,7 @@ int sd_dhcp_client_send_renew(sd_dhcp_client *client) {
|
||||
assert_return(client, -EINVAL);
|
||||
assert_return(client->fd >= 0, -EINVAL);
|
||||
|
||||
if (IN_SET(client->state, DHCP_STATE_INIT, DHCP_STATE_INIT_REBOOT, DHCP_STATE_STOPPED))
|
||||
if (!client->lease)
|
||||
return 0;
|
||||
|
||||
client->start_delay = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user