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.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
This commit is contained in:
Szymon Janc 2024-10-23 11:23:28 +02:00 committed by Benjamin Cabé
commit c002b1dc9e

View file

@ -2553,6 +2553,7 @@ static void l2cap_chan_le_recv_seg_direct(struct bt_l2cap_le_chan *chan, struct
if (seg->len > sdu_remaining) {
LOG_WRN("L2CAP RX PDU total exceeds SDU");
bt_l2cap_chan_disconnect(&chan->chan);
return;
}
/* Commit receive. */