Skip to content

Commit 1441c77

Browse files
ludvigsjjukkar
authored andcommitted
[nrf fromtree] Bluetooth: Mesh: Fix cfg_cli KRP not working for key_net_idx != 0
Initializes the `net_idx` field of the ack context properly for KRP functions in the Config Client. This fixes a problem where `bt_mesh_cfg_cli_krp_get` and `bt_mesh_cfg_cli_krp_set` would always fail the ack ctx comparison if `key_net_idx` was != 0. Signed-off-by: Ludvig Jordet <[email protected]> (cherry picked from commit 88f62a1) Signed-off-by: Håvard Reierstad <[email protected]> (cherry picked from commit 48cdbac)
1 parent 0e31692 commit 1441c77

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

subsys/bluetooth/mesh/cfg_cli.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,6 +1187,7 @@ int bt_mesh_cfg_cli_krp_get(uint16_t net_idx, uint16_t addr, uint16_t key_net_id
11871187
struct krp_param param = {
11881188
.status = status,
11891189
.phase = phase,
1190+
.net_idx = key_net_idx,
11901191
};
11911192
const struct bt_mesh_msg_rsp_ctx rsp = {
11921193
.ack = &cli->ack_ctx,
@@ -1209,6 +1210,7 @@ int bt_mesh_cfg_cli_krp_set(uint16_t net_idx, uint16_t addr, uint16_t key_net_id
12091210
struct krp_param param = {
12101211
.status = status,
12111212
.phase = phase,
1213+
.net_idx = key_net_idx,
12121214
};
12131215
const struct bt_mesh_msg_rsp_ctx rsp = {
12141216
.ack = &cli->ack_ctx,

0 commit comments

Comments
 (0)