summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2019-04-23 16:39:17 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2019-04-24 16:20:11 +0200
commit656753b70888badc29ffca592f82fd8355894596 (patch)
tree52afdb47c80d158a3f3fb445da9cc3c9ea3ceaf2
parent2d347e7e176e7cb8daaa2e02b0758821fc3f5f04 (diff)
downloadNetworkManager-656753b70888badc29ffca592f82fd8355894596.tar.gz
manager: clear unmanaged-sleeping flag on software devices on resume
When networking is disabled at NM startup we unmanage all devices (including software ones) due to SLEEPING. After networking gets enabled again we must clear the unmanaged-sleeping flag on software devices.
-rw-r--r--src/nm-manager.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 40e068ac5b..ed2fa3df4e 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -5923,10 +5923,10 @@ do_sleep_wake (NMManager *self, gboolean sleeping_changed)
c_list_for_each_entry (device, &priv->devices_lst_head, devices_lst) {
guint i;
- if (nm_device_is_software (device)) {
- /* We do not manage/unmanage software devices but
- * their dhcp leases could have gone stale so we need
- * to renew them */
+ if ( nm_device_is_software (device)
+ && !nm_device_get_unmanaged_flags (device, NM_UNMANAGED_SLEEPING)) {
+ /* DHCP leases of software devices could have gone stale
+ * so we need to renew them. */
nm_device_update_dynamic_ip_setup (device);
continue;
}