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:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user