dhcp4: do not try to renew address when client has no lease
This commit is contained in:
parent
ceaec54a3c
commit
921693a0f3
|
@ -1441,7 +1441,10 @@ static int client_timeout_t1(sd_event_source *s, uint64_t usec, void *userdata)
|
|||
sd_dhcp_client *client = userdata;
|
||||
DHCP_CLIENT_DONT_DESTROY(client);
|
||||
|
||||
client->state = DHCP_STATE_RENEWING;
|
||||
if (client->lease)
|
||||
client->state = DHCP_STATE_RENEWING;
|
||||
else if (client->state != DHCP_STATE_INIT)
|
||||
client->state = DHCP_STATE_INIT_REBOOT;
|
||||
client->attempt = 0;
|
||||
|
||||
return client_initialize_time_events(client);
|
||||
|
|
Loading…
Reference in New Issue