From ffb757083c345ea4f2bf09898e7c9e039fe5a41c Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sat, 30 Apr 2016 12:14:31 +0200 Subject: [PATCH] device: allow reapply with a different connection.uuid (cherry picked from commit ec840b0331e93faab6ad2e04fb0796b19caa52ee) --- src/devices/nm-device.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 1ec648a62c..8a7eb7d558 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -7314,10 +7314,16 @@ reapply_connection (NMDevice *self, NM_SETTING_CONNECTION_SETTING_NAME)) return FALSE; + /* whitelist allowed properties from "connection" setting which are allowed to differ. + * + * This includes UUID, there is no principal problem with reapplying a connection + * and changing it's UUID. In fact, disallowing it makes it cumbersome for the user + * to reapply any connection but the original settings-connection. */ if (!_hash_check_invalid_keys (diffs ? g_hash_table_lookup (diffs, NM_SETTING_CONNECTION_SETTING_NAME) : NULL, NM_SETTING_CONNECTION_SETTING_NAME, error, NM_SETTING_CONNECTION_ID, + NM_SETTING_CONNECTION_UUID, NM_SETTING_CONNECTION_ZONE, NM_SETTING_CONNECTION_METERED)) return FALSE;