diff --git a/libnm-util/nm-connection.c b/libnm-util/nm-connection.c
index 3a38ec4..cf91604 100644
--- a/libnm-util/nm-connection.c
+++ b/libnm-util/nm-connection.c
@@ -475,6 +475,43 @@ nm_connection_replace_settings (NMConnection *connection,
 	return nm_connection_verify (connection, error);
 }
 
+/**
+ * nm_connection_replace_settings_from_connection:
+ * @connection: a #NMConnection
+ * @new: a #NMConnection to replace the settings of @connection with
+ * @error: location to store error, or %NULL
+ *
+ * Deep-copies the settings of @new and replaces the settings of @connection
+ * with the copied settings.
+ *
+ * Returns: %TRUE if the settings were valid and added to the connection, %FALSE
+ * if they were not
+ **/
+gboolean
+nm_connection_replace_settings_from_connection (NMConnection *connection,
+                                                NMConnection *new,
+                                                GError **error)
+{
+	GHashTableIter iter;
+	NMSetting *setting;
+
+	g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
+	g_return_val_if_fail (NM_IS_CONNECTION (new), FALSE);
+	if (error)
+		g_return_val_if_fail (*error == NULL, FALSE);
+
+	/* No need to validate permissions like nm_connection_replace_settings()
+	 * since we're dealing with an NMConnection which has already done that.
+	 */
+	g_hash_table_remove_all (NM_CONNECTION_GET_PRIVATE (connection)->settings);
+
+	g_hash_table_iter_init (&iter, NM_CONNECTION_GET_PRIVATE (new)->settings);
+	while (g_hash_table_iter_next (&iter, NULL, (gpointer) &setting))
+		nm_connection_add_setting (connection, nm_setting_duplicate (setting));
+
+	return nm_connection_verify (connection, error);
+}
+
 typedef struct {
 	NMConnection *other;
 	gboolean failed;
diff --git a/libnm-util/nm-connection.h b/libnm-util/nm-connection.h
index 3ebffeb..431c5e8 100644
--- a/libnm-util/nm-connection.h
+++ b/libnm-util/nm-connection.h
@@ -135,6 +135,10 @@ gboolean      nm_connection_replace_settings (NMConnection *connection,
                                               GHashTable *new_settings,
                                               GError **error);
 
+gboolean      nm_connection_replace_settings_from_connection (NMConnection *connection,
+                                                              NMConnection *new,
+                                                              GError **error);
+
 gboolean      nm_connection_compare       (NMConnection *a,
                                            NMConnection *b,
                                            NMSettingCompareFlags flags);
