libnm: fix _nm_setting_property_compare_fcn_default() for "to_dbus_only_in_manager_process"

property_to_dbus() gets called for two reasons. Once from
_nm_setting_to_dbus(). In that case, we want to honor
to_dbus_only_in_manager_process().

It gets also called from _nm_setting_property_compare_fcn_default(),
with ignore_flags set. In that case, we don't want to ignore the property
as the hook really wants to compare them.

Fixes: c8392018ca ('libnm: refactor to-dbus on the client skipping to serialize legacy properties')
This commit is contained in:
Thomas Haller 2022-10-27 21:43:02 +02:00
parent 6414b016a7
commit 0f0468b208
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -1783,7 +1783,8 @@ property_to_dbus(const NMSettInfoSetting *sett_info,
|| NM_FLAGS_HAS(property_info->param_spec->flags, G_PARAM_WRITABLE)
|| property_info->property_type == &nm_sett_info_propert_type_setting_name);
if (property_info->to_dbus_only_in_manager_process && !_nm_utils_is_manager_process)
if (!ignore_flags && property_info->to_dbus_only_in_manager_process
&& !_nm_utils_is_manager_process)
return NULL;
if (property_info->param_spec && !ignore_flags