summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2020-01-07 12:03:21 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2020-01-07 18:01:58 +0100
commitf1683c7dd460e6f03f2db1567873cc0d39455549 (patch)
tree9cd408b74dac40a66b9bc34720e2727bd39f6867 /src
parent848b869c6ede3a796872a0b5cd8b2398804c3697 (diff)
downloadNetworkManager-bg/nettools-fixes-pt2.tar.gz
dhcp: nettools: handle 'retracted' event as 'expired'bg/nettools-fixes-pt2
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.
Diffstat (limited to 'src')
-rw-r--r--src/dhcp/nm-dhcp-nettools.c2
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;