Skip to content

Commit 1efce43

Browse files
PavelVPVjhedberg
authored andcommitted
Bluetooth: Mesh: Fix segmentation when sending proxy message
Previous check in the if-statement would never allow to send last segment if msg->len + 2 == MTU * x. Signed-off-by: Pavel Vasilyev <[email protected]>
1 parent c288746 commit 1efce43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/bluetooth/mesh/proxy_msg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ int bt_mesh_proxy_msg_send(struct bt_conn *conn, uint8_t type,
164164
net_buf_simple_pull(msg, mtu);
165165

166166
while (msg->len) {
167-
if (msg->len + 1 < mtu) {
167+
if (msg->len + 1 <= mtu) {
168168
net_buf_simple_push_u8(msg, PDU_HDR(SAR_LAST, type));
169169
err = role->cb.send(conn, msg->data, msg->len, end, user_data);
170170
if (err) {

0 commit comments

Comments
 (0)