diff --git a/libnm-core/nm-setting-team-port.c b/libnm-core/nm-setting-team-port.c index d9a444fe45..8d570c9e1c 100644 --- a/libnm-core/nm-setting-team-port.c +++ b/libnm-core/nm-setting-team-port.c @@ -136,7 +136,13 @@ compare_property (NMSetting *setting, { NMSettingClass *parent_class; - if (nm_streq0 (prop_spec->name, NM_SETTING_TEAM_PORT_CONFIG)) { + /* If we are trying to match a connection in order to assume it (and thus + * @flags contains INFERRABLE), use the "relaxed" matching for team + * configuration. Otherwise, for all other purposes (including connection + * comparison before an update), resort to the default string comparison. + */ + if ( NM_FLAGS_HAS (flags, NM_SETTING_COMPARE_FLAG_INFERRABLE) + && nm_streq0 (prop_spec->name, NM_SETTING_TEAM_PORT_CONFIG)) { return _nm_utils_team_config_equal (NM_SETTING_TEAM_PORT_GET_PRIVATE (setting)->config, NM_SETTING_TEAM_PORT_GET_PRIVATE (other)->config, TRUE); diff --git a/libnm-core/nm-setting-team.c b/libnm-core/nm-setting-team.c index f3bf758633..36cd312b6e 100644 --- a/libnm-core/nm-setting-team.c +++ b/libnm-core/nm-setting-team.c @@ -109,7 +109,13 @@ compare_property (NMSetting *setting, { NMSettingClass *parent_class; - if (nm_streq0 (prop_spec->name, NM_SETTING_TEAM_CONFIG)) { + /* If we are trying to match a connection in order to assume it (and thus + * @flags contains INFERRABLE), use the "relaxed" matching for team + * configuration. Otherwise, for all other purposes (including connection + * comparison before an update), resort to the default string comparison. + */ + if ( NM_FLAGS_HAS (flags, NM_SETTING_COMPARE_FLAG_INFERRABLE) + && nm_streq0 (prop_spec->name, NM_SETTING_TEAM_CONFIG)) { return _nm_utils_team_config_equal (NM_SETTING_TEAM_GET_PRIVATE (setting)->config, NM_SETTING_TEAM_GET_PRIVATE (other)->config, FALSE);