From fcbef9b6d35a296e96be6bd5ae1085b5c8283e05 Mon Sep 17 00:00:00 2001 From: Antonio Cardace Date: Thu, 12 Mar 2020 19:04:04 +0100 Subject: [PATCH] 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. --- src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c | 5 +++++ 1 file changed, 5 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 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) {