Bluetooth: Mesh: Fixes Friend Queue store message

If the SRC field of the received message is a unicast
address of an element of the Low Power node, then the
message shall not be stored in the Friend Queue.

Otherwise, lpn will discard this message, eventually
it breaks friendship.

Fixes: #30657

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
This commit is contained in:
Lingao Meng 2020-12-11 18:47:03 -08:00 committed by Carles Cufí
commit 5b11c053ef

View file

@ -1620,6 +1620,11 @@ void bt_mesh_friend_enqueue_rx(struct bt_mesh_net_rx *rx,
continue; continue;
} }
if (friend_lpn_matches(frnd, rx->sub->net_idx,
rx->ctx.addr)) {
continue;
}
if (!friend_queue_prepare_space(frnd, rx->ctx.addr, seq_auth, if (!friend_queue_prepare_space(frnd, rx->ctx.addr, seq_auth,
seg_count)) { seg_count)) {
continue; continue;