Skip to content

Commit f9219ba

Browse files
sjancrlubos
authored andcommitted
[nrf fromlist] Bluetooth: Host: L2CAP: Fix seg_recv call on SDU overflow
This fix calling seg_recv() callback being called even though channel is being disconnected due to SDU overflow. Upstream PR #: 80911 Signed-off-by: Szymon Janc <[email protected]> (cherry picked from commit 1c79ce0)
1 parent e9479cc commit f9219ba

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

subsys/bluetooth/host/l2cap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2553,6 +2553,7 @@ static void l2cap_chan_le_recv_seg_direct(struct bt_l2cap_le_chan *chan, struct
25532553
if (seg->len > sdu_remaining) {
25542554
LOG_WRN("L2CAP RX PDU total exceeds SDU");
25552555
bt_l2cap_chan_disconnect(&chan->chan);
2556+
return;
25562557
}
25572558

25582559
/* Commit receive. */

0 commit comments

Comments
 (0)