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.

this is port of a77c0c3ba7d5f5660285410a903bd6c6cf354829
This commit is contained in:
Krzysztof Kopyściński
2021-01-12 14:05:19 +01:00
committed by Łukasz Rymanowski
parent 569a6255a3
commit 07928f548a
+1 -1
View File
@@ -773,7 +773,7 @@ static void send_friend_clear(struct bt_mesh_friend *frnd)
.send_ttl = BT_MESH_TTL_MAX,
};
struct bt_mesh_net_tx tx = {
.sub = &bt_mesh.sub[0],
.sub = bt_mesh_subnet_get(frnd->net_idx),
.ctx = &ctx,
.src = bt_mesh_primary_addr(),
.xmit = bt_mesh_net_transmit_get(),