summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-10-23 09:53:18 +0200
committerThomas Haller <thaller@redhat.com>2017-10-24 16:25:00 +0200
commit94ba4c13f5d39245b93d381482479436b03c6890 (patch)
tree1f4a4498baff781ac428c59304504002b0f4de79
parent323274b415e924f04e55de1438c0d66ae0906e56 (diff)
downloadNetworkManager-th/ifcfg-rule-write-rh1384799.tar.gz
ifcfg-rh/trivial: add code comment about re-reading connection in writerth/ifcfg-rule-write-rh1384799
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c
index a51a6f5079..68eed84c87 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c
@@ -2958,6 +2958,13 @@ nms_ifcfg_rh_writer_write_connection (NMConnection *connection,
}
}
+ /* Note that we just wrote the connection to disk, and re-read it from there.
+ * That is racy if somebody else modifies the connection.
+ *
+ * A better solution might be, to re-read the connection only based on the
+ * in-memory representation of what we collected above. But the reader
+ * does not yet allow to inject the configuration. */
+
if (out_reread || out_reread_same) {
gs_unref_object NMConnection *reread = NULL;
gs_free_error GError *local = NULL;