mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
dhcp4: do not renew address if client is not running yet
This commit is contained in:
parent
c82012605b
commit
ceaec54a3c
@ -2012,6 +2012,9 @@ 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))
|
||||
return 0;
|
||||
|
||||
client->start_delay = 0;
|
||||
client->attempt = 1;
|
||||
client->state = DHCP_STATE_RENEWING;
|
||||
|
Loading…
Reference in New Issue
Block a user