device: update unamanged by user-config when device gets renamed

https://bugzilla.gnome.org/show_bug.cgi?id=766404
This commit is contained in:
Thomas Haller
2016-05-16 17:36:56 +02:00
parent 7961e1bb8a
commit 0c4a23a438

View File

@@ -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;
}