mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-01 11:28:02 +02:00
dhcp: nettools: handle 'retracted' event as 'expired'
The 'retracted' event is emitted when the client receives a NAK in the rebooting, requesting, renewing or rebinding state, while 'expired' means that the client wasn't able to renew the lease before expiry. In both cases the old lease is no longer valid and n-dhcp4 keep trying to get a lease, so the two events should be handlded in the same way. Note that the systemd client doesn't have a 'retracted' event and considers all NAKs as 'expired' events.
This commit is contained in:
parent
218782a9a3
commit
2523000b36
1 changed files with 1 additions and 1 deletions
|
|
@ -1028,10 +1028,10 @@ dhcp4_event_handle (NMDhcpNettools *self,
|
|||
_LOGW ("selecting lease failed: %d", r);
|
||||
}
|
||||
break;
|
||||
case N_DHCP4_CLIENT_EVENT_RETRACTED:
|
||||
case N_DHCP4_CLIENT_EVENT_EXPIRED:
|
||||
nm_dhcp_client_set_state (NM_DHCP_CLIENT (self), NM_DHCP_STATE_EXPIRE, NULL, NULL);
|
||||
break;
|
||||
case N_DHCP4_CLIENT_EVENT_RETRACTED:
|
||||
case N_DHCP4_CLIENT_EVENT_CANCELLED:
|
||||
nm_dhcp_client_set_state (NM_DHCP_CLIENT (self), NM_DHCP_STATE_FAIL, NULL, NULL);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue