dhcp4: only renewing lease when the client already has a lease

Follow-up for ceaec54a3c.

Hopefully fixes #16299.
This commit is contained in:
Yu Watanabe
2020-07-16 14:58:54 +09:00
parent 330f899079
commit 0ded0e40ab
+1 -1
View File
@@ -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;