connections = nm_settings_get_connections (priv->settings);
for (iter = connections; iter; iter = g_slist_next (iter)) {
NMConnection *candidate = iter->data;
+ gs_free_error GError *error = NULL;
+ gs_free char *ifname = NULL;
NMDevice *parent;
parent = find_parent_device_for_connection (self, candidate, NULL);
- if (parent == device)
- connection_changed (priv->settings, candidate, self);
+ if (parent == device) {
+ /* Only try to activate devices that don't already exist */
+ ifname = nm_manager_get_connection_iface (self, candidate, &parent, &error);
+ if (ifname) {
+ if (!nm_platform_link_get_by_ifname (NM_PLATFORM_GET, ifname))
+ connection_changed (priv->settings, candidate, self);
+ }
+ }
}
g_slist_free (connections);