summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-12-11 18:40:22 +0100
committerThomas Haller <thaller@redhat.com>2017-12-11 18:48:47 +0100
commit023ce50d2188af557b4f2af39ec5a3342612aa2f (patch)
tree43459f2ce289e2e6a94688df1c2611d25884ee47
parente8299e30b864264207f2c77702762f8fe243e733 (diff)
downloadNetworkManager-023ce50d2188af557b4f2af39ec5a3342612aa2f.tar.gz
settings: mark the connection as UNSAVED if it was modified in-memory
-rw-r--r--src/settings/nm-settings-connection.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c
index 6ee4ea5cb9..b6e894049f 100644
--- a/src/settings/nm-settings-connection.c
+++ b/src/settings/nm-settings-connection.c
@@ -691,7 +691,11 @@ nm_settings_connection_update (NMSettingsConnection *self,
nm_settings_connection_recheck_visibility (self);
- set_persist_mode (self, persist_mode);
+ if ( replaced
+ && persist_mode == NM_SETTINGS_CONNECTION_PERSIST_MODE_KEEP)
+ set_persist_mode (self, NM_SETTINGS_CONNECTION_PERSIST_MODE_UNSAVED);
+ else
+ set_persist_mode (self, persist_mode);
if (NM_IN_SET (persist_mode, NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY_ONLY,
NM_SETTINGS_CONNECTION_PERSIST_MODE_VOLATILE_ONLY))