Bluetooth: Mesh: Disable randomization on Link Close in RPR server

Disable randomization at the access layer in the Remote Provisioning
server when sending Link Stauts message as a responce on Link Close
message and then sending Link Report message right after it. Because of
the randomization, the report message is sent before the status message
which makes MESH/SR/RPR/PDU/BV-03-C test to fail.

This fixes MESH/SR/RPR/PDU/BV-03-C test.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit is contained in:
Pavel Vasilyev 2024-02-08 14:49:21 +01:00 committed by Maureen Helm
commit 0ea8cef97a

View file

@ -968,6 +968,12 @@ static int handle_link_close(const struct bt_mesh_model *mod, struct bt_mesh_msg
* which will be used in the link report when the link is fully closed.
*/
/* Disable randomization for the Remote Provisioning Link Status message to avoid reordering
* of it with the Remote Provisioning Link Report message that shall be sent in a sequence
* when closing an active link (see section 4.4.5.5.3.3 of MshPRTv1.1).
*/
ctx->rnd_delay = false;
link_status_send(ctx, BT_MESH_RPR_SUCCESS);
link_close(BT_MESH_RPR_ERR_LINK_CLOSED_BY_CLIENT, reason);