From 94ba4c13f5d39245b93d381482479436b03c6890 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 23 Oct 2017 09:53:18 +0200 Subject: ifcfg-rh/trivial: add code comment about re-reading connection in writer --- src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- cgit v1.2.1