libnm-core: fix p-key validation for Infiniband connections

verify() is setting an error without returning FALSE to make the
validation fail. When the parent is set, the device is a Infiniband
partition and it must have a p-key != -1.

Fixes: d595f7843e ('libnm: add libnm/libnm-core (part 1)')
This commit is contained in:
Beniamino Galvani
2025-07-07 09:15:01 +02:00
parent fa80896ee7
commit f4f1ecc7ea

View File

@@ -212,6 +212,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
NM_CONNECTION_ERROR_INVALID_PROPERTY, NM_CONNECTION_ERROR_INVALID_PROPERTY,
_("Must specify a P_Key if specifying parent")); _("Must specify a P_Key if specifying parent"));
g_prefix_error(error, "%s: ", NM_SETTING_INFINIBAND_PARENT); g_prefix_error(error, "%s: ", NM_SETTING_INFINIBAND_PARENT);
return FALSE;
} }
} }