summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-03-29 10:57:51 +0200
committerThomas Haller <thaller@redhat.com>2018-04-13 09:09:46 +0200
commitfdbf696f22894304e6f4313edaa57464cfdc5c95 (patch)
treea38d8c13ccccbd8eb8bd209373b8e38ad54e7b84
parent24c3eacac6a6bb9b0574fa6d33b4083b6f55a90f (diff)
downloadNetworkManager-fdbf696f22894304e6f4313edaa57464cfdc5c95.tar.gz
settings: clear connection path when unexporting from D-Bus
At that point, the path becomes meaningless. Clear it.
-rw-r--r--src/settings/nm-settings.c4
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c
index c0a474c297..d335850a92 100644
--- a/src/settings/nm-settings.c
+++ b/src/settings/nm-settings.c
@@ -904,8 +904,10 @@ connection_removed (NMSettingsConnection *connection, gpointer user_data)
/* Re-emit for listeners like NMPolicy */
_notify (self, PROP_CONNECTIONS);
- if (nm_dbus_object_is_exported (NM_DBUS_OBJECT (connection)))
+ if (nm_dbus_object_is_exported (NM_DBUS_OBJECT (connection))) {
+ nm_connection_set_path (NM_CONNECTION (connection), NULL);
nm_dbus_object_unexport (NM_DBUS_OBJECT (connection));
+ }
check_startup_complete (self);
}
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c
index bc0ad448af..5a8778ba2f 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c
@@ -334,9 +334,6 @@ update_connection (SettingsPluginIfcfg *self,
* been removed.
*/
nm_settings_connection_signal_remove (NM_SETTINGS_CONNECTION (connection_by_uuid));
- /* Remove the path so that claim_connection() doesn't complain later when
- * interface gets managed and connection is re-added. */
- nm_connection_set_path (NM_CONNECTION (connection_by_uuid), NULL);
/* signal_remove() will end up removing the connection from our hash,
* so add it back now.