Skip to content

Commit

Permalink
[nrf fromtree] Bluetooth: Mesh: Fix cfg_cli KRP not working for key_n…
Browse files Browse the repository at this point in the history
…et_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 88f62a1a5eb5cdf51a9d5a2d847712c9b33f3193)
Signed-off-by: Håvard Reierstad <[email protected]>
  • Loading branch information
ludvigsj authored and carlescufi committed Dec 4, 2024
1 parent 7d31b72 commit 48cdbac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions subsys/bluetooth/mesh/cfg_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1187,6 +1187,7 @@ int bt_mesh_cfg_cli_krp_get(uint16_t net_idx, uint16_t addr, uint16_t key_net_id
struct krp_param param = {
.status = status,
.phase = phase,
.net_idx = key_net_idx,
};
const struct bt_mesh_msg_rsp_ctx rsp = {
.ack = &cli->ack_ctx,
Expand All @@ -1209,6 +1210,7 @@ int bt_mesh_cfg_cli_krp_set(uint16_t net_idx, uint16_t addr, uint16_t key_net_id
struct krp_param param = {
.status = status,
.phase = phase,
.net_idx = key_net_idx,
};
const struct bt_mesh_msg_rsp_ctx rsp = {
.ack = &cli->ack_ctx,
Expand Down

0 comments on commit 48cdbac

Please sign in to comment.