diff options
author | Thomas Haller <thaller@redhat.com> | 2016-05-16 17:36:56 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-05-17 12:06:36 +0200 |
commit | 0c4a23a43806dedd30711b9b1ec8ad62f29b0387 (patch) | |
tree | 158ba16fa917e664ca9e6741da17912bb36aab3d | |
parent | 7961e1bb8a1c9fbe5ff833444caeff7da0d6ce0b (diff) | |
download | NetworkManager-0c4a23a43806dedd30711b9b1ec8ad62f29b0387.tar.gz |
device: update unamanged by user-config when device gets renamed
https://bugzilla.gnome.org/show_bug.cgi?id=766404
-rw-r--r-- | src/devices/nm-device.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 1b25d957a2..a89e88d434 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -1593,6 +1593,7 @@ device_link_changed (NMDevice *self) const NMPlatformLink *pllink; int ifindex; gboolean was_up; + gboolean update_unmanaged_specs = FALSE; priv->device_link_changed_id = 0; @@ -1639,6 +1640,11 @@ device_link_changed (NMDevice *self) /* If the device has no explicit ip_iface, then changing iface changes ip_iface too. */ ip_ifname_changed = !priv->ip_iface; + if (nm_device_get_unmanaged_flags (self, NM_UNMANAGED_PLATFORM_INIT)) + nm_device_set_unmanaged_by_user_config (self, nm_connection_provider_get_unmanaged_specs (priv->con_provider)); + else + update_unmanaged_specs = TRUE; + _notify (self, PROP_IFACE); if (ip_ifname_changed) _notify (self, PROP_IP_IFACE); @@ -1712,6 +1718,9 @@ device_link_changed (NMDevice *self) } } + if (update_unmanaged_specs) + nm_device_set_unmanaged_by_user_config (self, nm_connection_provider_get_unmanaged_specs (priv->con_provider)); + return G_SOURCE_REMOVE; } |