From 2566e99fbea9f76ab6b68e17bbf89ee259abcb10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alfonso=20S=C3=A1nchez-Beato?= Date: Fri, 24 Mar 2023 17:42:15 +0000 Subject: [PATCH] core: do not check 'match' settings when comparing connections Match settings are already used for matching an existing connection to a device, it does not really make sense to compare them with an auto-generated connection that is not going to have them. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1585 --- src/core/NetworkManagerUtils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/NetworkManagerUtils.c b/src/core/NetworkManagerUtils.c index b65745a1c..972bcf0a1 100644 --- a/src/core/NetworkManagerUtils.c +++ b/src/core/NetworkManagerUtils.c @@ -767,6 +767,10 @@ check_possible_match(NMConnection *orig, if (!check_connection_s390_props(orig, candidate, settings)) return NULL; + /* match properties are for matching from static to generated connections, + * so they are not really part of the difference. */ + g_hash_table_remove(settings, NM_SETTING_MATCH_SETTING_NAME); + if (g_hash_table_size(settings) == 0) return candidate; else