libnm-core: add missing flags check in .to_dbus_function()

Properties that define a .to_dbus_function() as a D-Bus override, need
to return early if the flags only ask to serialize secrets.

Fixes: 7fb23b0a62 ('libnm: add NMIPRoutingRule API')
This commit is contained in:
Beniamino Galvani 2026-02-23 18:09:12 +01:00
parent 128b49fe21
commit eff8330b57

View file

@ -5079,6 +5079,9 @@ routing_rules_to_dbus(_NM_SETT_INFO_PROP_TO_DBUS_FCN_ARGS _nm_nil)
gboolean any = FALSE;
guint i;
if (!_nm_connection_serialize_non_secret(flags))
return NULL;
priv = NM_SETTING_IP_CONFIG_GET_PRIVATE(self);
if (!priv->routing_rules || priv->routing_rules->len == 0)