Skip to content

Commit c65d046

Browse files
Johan Hedbergjhedberg
authored andcommitted
Bluetooth: Mesh: Fix looking up existing friendship contexts
When receiving Friend Offers we should also consider unestablished contexts, and simply start from the beginning if that happens. Signed-off-by: Johan Hedberg <[email protected]>
1 parent a9a18ce commit c65d046

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

subsys/bluetooth/host/mesh/friend.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,10 +816,10 @@ int bt_mesh_friend_req(struct bt_mesh_net_rx *rx, struct net_buf_simple *buf)
816816
old_friend = sys_be16_to_cpu(msg->prev_addr);
817817
if (BT_MESH_ADDR_IS_UNICAST(old_friend)) {
818818
frnd = bt_mesh_friend_find(rx->sub->net_idx, old_friend,
819-
true, true);
819+
true, false);
820820
} else {
821821
frnd = bt_mesh_friend_find(rx->sub->net_idx, rx->ctx.addr,
822-
true, true);
822+
true, false);
823823
}
824824

825825
if (frnd) {

0 commit comments

Comments
 (0)