Skip to content

Conversation

@jhedberg
Copy link
Member

The code for checking space in the Friend queue was faulty in the case
that we receive a message with more segments than the configure Friend
Queue size. This is not an issue for the default configuration but
still a possible one. Move the check for exceeding Friend Queue Size
to the per-LPN function, so that bt_mesh_friend_queue_has_space()
iterates all LPNs before delivering its verdict. This allows us to
return success in case no LPN matched (which is how the code was
intended to work).

Fixes #18522

Signed-off-by: Johan Hedberg [email protected]

@jhedberg jhedberg added bug The issue is a bug, or the PR is fixing a bug area: Bluetooth area: Bluetooth Mesh labels Aug 20, 2019
@jhedberg jhedberg requested a review from trond-snekvik August 20, 2019 14:28
@jhedberg jhedberg added the Backport Backport PR and backport failure issues label Aug 20, 2019
@jhedberg
Copy link
Member Author

@menglingao1997 FYI

@jhedberg jhedberg requested a review from carlescufi August 20, 2019 14:35
@jhedberg
Copy link
Member Author

recheck

The code for checking space in the Friend queue was faulty in the case
that we receive a message with more segments than the configured Friend
Queue size. This is not an issue for the default configuration but
still a possible one. Move the check for exceeding Friend Queue Size
to the per-LPN function, so that bt_mesh_friend_queue_has_space()
iterates all LPNs before delivering its verdict. This allows us to
return success in case no LPN matched (which is how the code was
intended to work).

Fixes zephyrproject-rtos#18522

Signed-off-by: Johan Hedberg <[email protected]>
@jhedberg jhedberg force-pushed the fix_friend_queue_check branch from f6c2d8d to 6e2d02d Compare August 20, 2019 17:22
@jhedberg jhedberg merged commit 6de5b79 into zephyrproject-rtos:master Aug 20, 2019
@jhedberg jhedberg deleted the fix_friend_queue_check branch August 20, 2019 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Bluetooth Mesh area: Bluetooth Backport Backport PR and backport failure issues bug The issue is a bug, or the PR is fixing a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BLE: Mesh: When transport send seg_msg to LPN

2 participants