Skip to content

Commit 4ae187c

Browse files
Vudentzgregkh
authored andcommitted
Bluetooth: L2CAP: Fix printing wrong information if SDU length exceeds MTU
[ Upstream commit 15bf35a ] The code was printing skb->len and sdu_len in the places where it should be sdu_len and chan->imtu respectively to match the if conditions. Link: https://lore.kernel.org/linux-bluetooth/20260315132013.75ab40c5@kernel.org/T/#m1418f9c82eeff8510c1beaa21cf53af20db96c06 Fixes: e1d9a66 ("Bluetooth: LE L2CAP: Disconnect if received packet's SDU exceeds IMTU") Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 8042240 commit 4ae187c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/bluetooth/l2cap_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6733,7 +6733,7 @@ static int l2cap_ecred_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb)
67336733

67346734
if (sdu_len > chan->imtu) {
67356735
BT_ERR("Too big LE L2CAP SDU length: len %u > %u",
6736-
skb->len, sdu_len);
6736+
sdu_len, chan->imtu);
67376737
l2cap_send_disconn_req(chan, ECONNRESET);
67386738
err = -EMSGSIZE;
67396739
goto failed;

0 commit comments

Comments
 (0)