mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-06 16:20:34 +01:00
n-dhcp4: move back to INIT after lease expires
Move back to INIT state after the lease expires, as per section 4.4.5 of RFC 2131. Previously the client just moved to EXPIRED, closed the connection and cleared the probe, leaving to the caller of the library the choice to create a new client instance and to start from scratch. However, it seems more useful that the client, once initialized, always tries to get a lease even after an expiration.
This commit is contained in:
parent
aee78ca788
commit
182a8021f3
1 changed files with 3 additions and 4 deletions
|
|
@ -841,11 +841,10 @@ static int n_dhcp4_client_probe_transition_lifetime(NDhcp4ClientProbe *probe) {
|
|||
return r;
|
||||
|
||||
c_assert(probe->client->current_probe == probe);
|
||||
probe->client->current_probe = NULL;
|
||||
probe->current_lease = n_dhcp4_client_lease_unref(probe->current_lease);
|
||||
|
||||
n_dhcp4_c_connection_close(&probe->connection);
|
||||
|
||||
probe->state = N_DHCP4_CLIENT_PROBE_STATE_EXPIRED;
|
||||
probe->state = N_DHCP4_CLIENT_PROBE_STATE_INIT;
|
||||
probe->ns_deferred = n_dhcp4_gettime(CLOCK_BOOTTIME) + UINT64_C(1);
|
||||
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue