From f4f1ecc7eaabc65bfe6d94eb1751c7cdaf9a4c89 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 7 Jul 2025 09:15:01 +0200 Subject: [PATCH] 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: d595f7843e31 ('libnm: add libnm/libnm-core (part 1)') --- src/libnm-core-impl/nm-setting-infiniband.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libnm-core-impl/nm-setting-infiniband.c b/src/libnm-core-impl/nm-setting-infiniband.c index 24e5807ac..b70247c1c 100644 --- a/src/libnm-core-impl/nm-setting-infiniband.c +++ b/src/libnm-core-impl/nm-setting-infiniband.c @@ -212,6 +212,7 @@ verify(NMSetting *setting, NMConnection *connection, GError **error) NM_CONNECTION_ERROR_INVALID_PROPERTY, _("Must specify a P_Key if specifying parent")); g_prefix_error(error, "%s: ", NM_SETTING_INFINIBAND_PARENT); + return FALSE; } }