Skip to content

Commit 2f691d2

Browse files
Maximus Liunashif
authored andcommitted
Bluetooth: Mesh: Fixes wrong subnet used for Friend Clear
When Friend node tries to send Friend Clear message to other Friend nodes, it should use the subnet information based on the net_idx from friendship. Fixes #21165 Signed-off-by: Maximus Liu <[email protected]>
1 parent 3a4d547 commit 2f691d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/bluetooth/mesh/friend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ static void send_friend_clear(struct bt_mesh_friend *frnd)
749749
.send_ttl = BT_MESH_TTL_MAX,
750750
};
751751
struct bt_mesh_net_tx tx = {
752-
.sub = &bt_mesh.sub[0],
752+
.sub = bt_mesh_subnet_get(frnd->net_idx),
753753
.ctx = &ctx,
754754
.src = bt_mesh_primary_addr(),
755755
.xmit = bt_mesh_net_transmit_get(),

0 commit comments

Comments
 (0)