Skip to content
Commit 953f8ee0 authored by Pavel Vasilyev's avatar Pavel Vasilyev Committed by Carles Cufi
Browse files

Bluetooth: Mesh: Fix RPL fragmentation



`bt_mesh_rpl_check` stops iterating `replay_list` if either it found an
entry with the requested source address or unassigned address. When IV
index updated, `bt_mesh_rpl_reset` is called. It will set `old_iv` to 1
for all entries with fresh IV index and remove entries with old IV index.
If the entries with old IV index are mixed with other entries, this will
cause fragmentation of `replay_list`. The next time `bt_mesh_rpl_check`
is called, it may stop iterating `replay_list` earlier than it should
because it will meet an empty entry before it iterates over all entries
in the list.

This commit does defragmentatino of `replay_list` on every
`bt_mesh_rpl_reset` by shiting existing entries to the vacated places.

Signed-off-by: default avatarPavel Vasilyev <pavel.vasilyev@nordicsemi.no>
parent 4ef13f7e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment