Skip to content

Commit

Permalink
[nrf fromlist] Bluetooth: Host: L2CAP: Fix seg_recv call on SDU overflow
Browse files Browse the repository at this point in the history
This fix calling seg_recv() callback being called even though channel
is being disconnected due to SDU overflow.

Upstream PR #: 80911

Signed-off-by: Lang Xie <lang.xie@nordicsemi.no>
  • Loading branch information
laxiLang committed Nov 5, 2024
1 parent b16abc6 commit 34e1692
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions subsys/bluetooth/host/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2557,6 +2557,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. */
Expand Down

0 comments on commit 34e1692

Please sign in to comment.