diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2020-01-07 12:03:21 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2020-01-09 09:04:08 +0100 |
commit | 2523000b36b113fd7b94ae6b7178f6fd33908ef9 (patch) | |
tree | 359c4eb93ab21ed81a7c3d8f7435ef846bb006c9 | |
parent | 218782a9a3c326f5c8cc3ea40dc0cd039060b188 (diff) | |
download | NetworkManager-2523000b36b113fd7b94ae6b7178f6fd33908ef9.tar.gz |
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.
-rw-r--r-- | src/dhcp/nm-dhcp-nettools.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dhcp/nm-dhcp-nettools.c b/src/dhcp/nm-dhcp-nettools.c index 30820c615a..76a2c2e0aa 100644 --- a/src/dhcp/nm-dhcp-nettools.c +++ b/src/dhcp/nm-dhcp-nettools.c @@ -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; |