diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2020-07-02 17:38:10 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2020-07-21 10:12:41 +0200 |
commit | ef755588ad55261c6ade4ba0278d51d777022183 (patch) | |
tree | 341dd44bf3fb82c4dee43f43dfb679165200edfb | |
parent | 8db15290831bad6fb773658e6bcead952ea65d36 (diff) | |
download | NetworkManager-ef755588ad55261c6ade4ba0278d51d777022183.tar.gz |
device: restart DHCP only for devices that are active or activating
do_sleep_wake() tries to restart DHCP for all devices, even ones that
are disconnecting. When a device is disconnecting, it still has a DHCP
client instance but we shouldn't restart it because it makes no sense;
and especially, the device could be already removed.
https://bugzilla.redhat.com/show_bug.cgi?id=1852612
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/561
(cherry picked from commit 2c50438987527a30d99c07601b8f1d1c9557cdaf)
(cherry picked from commit 53214901800ebcd1e1fabf98442983939af979bc)
-rw-r--r-- | src/devices/nm-device.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 17f8197556..cca73ea03f 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -3571,6 +3571,10 @@ nm_device_update_dynamic_ip_setup (NMDevice *self) priv = NM_DEVICE_GET_PRIVATE (self); + if ( priv->state < NM_DEVICE_STATE_IP_CONFIG + || priv->state > NM_DEVICE_STATE_ACTIVATED) + return; + g_hash_table_remove_all (priv->ip6_saved_properties); if (priv->dhcp_data_4.client) { |