summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Cardace <acardace@redhat.com>2020-03-12 19:04:04 +0100
committerAntonio Cardace <acardace@redhat.com>2020-03-19 17:26:08 +0100
commitfcbef9b6d35a296e96be6bd5ae1085b5c8283e05 (patch)
treebd90fd7e37b831e753b3048a0b3d7a3d32cbca74
parentfc8784a011d3c547060eb134bf98131878a313a5 (diff)
downloadNetworkManager-fcbef9b6d35a296e96be6bd5ae1085b5c8283e05.tar.gz
ifcfg-rh: add 'timestamp' property before comparing a reread connection
Since ifcfg-rh doesn't write out to file the 'connection.timestamp' property let's add it before comparing an updated connection with the plugin's reread one otherwise the comparison operation would always fail. The fix is not necessary for the keyfile plugin, because the reader/writer correctly reads/writes the connection timestamp.
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c5
1 files changed, 5 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 2d7f9853d4..07a5f5dd34 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c
@@ -3254,6 +3254,11 @@ nms_ifcfg_rh_writer_write_connection (NMConnection *connection,
_LOGW ("write: failure to re-read connection \"%s\": %s",
svFileGetName (ifcfg), "connection is unhandled");
} else {
+ /* ifcfg-rh doesn't support the 'timestamp' property, let's add it here */
+ g_object_set (nm_connection_get_setting_connection (reread),
+ NM_SETTING_CONNECTION_TIMESTAMP,
+ nm_setting_connection_get_timestamp (nm_connection_get_setting_connection (connection)),
+ NULL);
if (out_reread_same) {
reread_same = nm_connection_compare (reread, connection, NM_SETTING_COMPARE_FLAG_EXACT);
if (!reread_same) {