summaryrefslogtreecommitdiff
path: root/src/settings/plugins
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-12-11 11:37:29 +0100
committerThomas Haller <thaller@redhat.com>2017-12-11 12:12:08 +0100
commit7044febf97debaf04b7f9ca4fbb2dc24fcf1b0b0 (patch)
tree5a0bad3f78f0c2d75ae6b4d00ea552a04b30d115 /src/settings/plugins
parente75fc8279becce29e688551930d85e59e1280c89 (diff)
downloadNetworkManager-7044febf97debaf04b7f9ca4fbb2dc24fcf1b0b0.tar.gz
settings: fix clearing nm-generated/volatile flags of connection
There are a few cases where we don't want to clear a potential nm-generated/volatile flag, but only mark the connection as unsaved. Otherwise, we wrongly end up clearing these flags and the connection is wrongly not NM_DEVICE_SYS_IFACE_STATE_EXTERNAL. Fixes: 35dc6421de78cffd1761cfb6edf9e94233f99966
Diffstat (limited to 'src/settings/plugins')
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c2
-rw-r--r--src/settings/plugins/ifnet/nms-ifnet-connection.c2
-rw-r--r--src/settings/plugins/keyfile/nms-keyfile-connection.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c
index b81a9eb919..3cf5c978c9 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c
@@ -443,7 +443,7 @@ nm_ifcfg_connection_new (NMConnection *source,
tmp,
full_path
? NM_SETTINGS_CONNECTION_PERSIST_MODE_KEEP /* connection is already on disk */
- : NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY,
+ : NM_SETTINGS_CONNECTION_PERSIST_MODE_UNSAVED,
NM_SETTINGS_CONNECTION_COMMIT_REASON_NONE,
NULL,
error))
diff --git a/src/settings/plugins/ifnet/nms-ifnet-connection.c b/src/settings/plugins/ifnet/nms-ifnet-connection.c
index aeb4467472..e7cd19cd2c 100644
--- a/src/settings/plugins/ifnet/nms-ifnet-connection.c
+++ b/src/settings/plugins/ifnet/nms-ifnet-connection.c
@@ -189,7 +189,7 @@ nm_ifnet_connection_new (NMConnection *source, const char *conn_name)
if (!nm_settings_connection_update (NM_SETTINGS_CONNECTION (object),
tmp,
update_unsaved
- ? NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY
+ ? NM_SETTINGS_CONNECTION_PERSIST_MODE_UNSAVED
: NM_SETTINGS_CONNECTION_PERSIST_MODE_KEEP,
NM_SETTINGS_CONNECTION_COMMIT_REASON_NONE,
NULL,
diff --git a/src/settings/plugins/keyfile/nms-keyfile-connection.c b/src/settings/plugins/keyfile/nms-keyfile-connection.c
index 9e9ab9621b..5a6d8a76e7 100644
--- a/src/settings/plugins/keyfile/nms-keyfile-connection.c
+++ b/src/settings/plugins/keyfile/nms-keyfile-connection.c
@@ -162,7 +162,7 @@ nms_keyfile_connection_new (NMConnection *source,
if (!nm_settings_connection_update (NM_SETTINGS_CONNECTION (object),
tmp,
update_unsaved
- ? NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY
+ ? NM_SETTINGS_CONNECTION_PERSIST_MODE_UNSAVED
: NM_SETTINGS_CONNECTION_PERSIST_MODE_KEEP,
NM_SETTINGS_CONNECTION_COMMIT_REASON_NONE,
NULL,