about summary refs log tree commit diff
path: root/src/core/settings/nm-settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/settings/nm-settings.c')
-rw-r--r--src/core/settings/nm-settings.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/settings/nm-settings.c b/src/core/settings/nm-settings.c
index b7d846c6..9995b490 100644
--- a/src/core/settings/nm-settings.c
+++ b/src/core/settings/nm-settings.c
@@ -2009,6 +2009,7 @@ nm_settings_update_connection(NMSettings                      *self,
     const char                        *uuid;
     gboolean                           tombstone_in_memory = FALSE;
     gboolean                           tombstone_on_disk   = FALSE;
+    NMSettingsConnectionIntFlags       new_flags;
 
     g_return_val_if_fail(NM_IS_SETTINGS(self), FALSE);
     g_return_val_if_fail(NM_IS_SETTINGS_CONNECTION(sett_conn), FALSE);
@@ -2228,13 +2229,16 @@ nm_settings_update_connection(NMSettings                      *self,
             }
         }
 
+        new_flags = nm_settings_connection_get_flags(sett_conn);
+        new_flags = NM_FLAGS_ASSIGN_MASK(new_flags, sett_mask, sett_flags);
+
         if (!update_storage) {
             success = _add_connection_to_first_plugin(self,
                                                       plugin_name,
                                                       sett_conn_entry,
                                                       connection,
                                                       new_in_memory,
-                                                      sett_flags,
+                                                      new_flags,
                                                       new_shadowed_storage_filename,
                                                       new_shadowed_owned,
                                                       &new_storage,
@@ -2245,7 +2249,7 @@ nm_settings_update_connection(NMSettings                      *self,
             success = _update_connection_to_plugin(self,
                                                    update_storage,
                                                    connection,
-                                                   sett_flags,
+                                                   new_flags,
                                                    update_reason,
                                                    new_shadowed_storage_filename,
                                                    new_shadowed_owned,
@@ -3479,7 +3483,7 @@ _save_hostname_write_cb(GObject *source, GAsyncResult *result, gpointer user_dat
 
     nm_utils_user_data_unpack(user_data, &self, &context, &auth_subject, &hostname, &cancellable);
 
-    nm_hostname_manager_write_hostname_finish(NM_HOSTNAME_MANAGER(source), result, &error);
+    nm_hostname_manager_set_static_hostname_finish(NM_HOSTNAME_MANAGER(source), result, &error);
 
     nm_audit_log_control_op(NM_AUDIT_OP_HOSTNAME_SAVE,
                             hostname ?: "",
@@ -3544,7 +3548,7 @@ _save_hostname_pk_cb(NMAuthChain *chain, GDBusMethodInvocation *context, gpointe
                                   (gpointer *) &priv->shutdown_cancellable);
     }
 
-    nm_hostname_manager_write_hostname(
+    nm_hostname_manager_set_static_hostname(
         priv->hostname_manager,
         hostname,
         priv->shutdown_cancellable,