linux/net/bluetooth
Mat Martineau 35c84d76ee Bluetooth: Fix a redundant and problematic incoming MTU check
The L2CAP MTU for incoming data is verified differently depending on
the L2CAP mode, so the check is best performed in a mode-specific
context.  Checking the incoming MTU before HCI fragment reassembly is
a layer violation and assumes all bytes after the standard L2CAP
header are L2CAP data.

This approach causes issues with unsegmented ERTM or streaming mode
frames, where there are additional enhanced or extended headers before
the data payload and possible FCS bytes after the data payload.  A
valid frame could be as many as 10 bytes larger than the MTU.

Removing this code is the best fix, because the MTU is checked later
on for all L2CAP data frames (connectionless, basic, ERTM, and
streaming).  This also gets rid of outdated locking (socket instead of
l2cap_chan) and an extra lookup of the channel ID.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Reviewed-by: Ulisses Furquim <ulisses@profusion.mobi>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
2012-05-16 16:13:37 -03:00
..
bnep Bluetooth: bnep: use constant for ethertype 2012-05-09 01:40:54 -03:00
cmtp Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
hidp Bluetooth: Use kernel int types instead of ones from stdint.h 2012-02-27 12:34:39 +02:00
rfcomm Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
af_bluetooth.c Bluetooth: notify userspace of security level change 2012-05-14 13:51:25 -04:00
hci_conn.c Bluetooth: Remove unused hci_le_ltk_neg_reply() 2012-05-09 01:40:51 -03:00
hci_core.c Bluetooth: Fix packet size provided to the controller 2012-05-16 16:12:49 -03:00
hci_event.c Bluetooth: Fix EIR data generation for mgmt_device_found 2012-05-16 16:13:19 -03:00
hci_sock.c Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-03-29 18:12:23 -07:00
hci_sysfs.c Bluetooth: trivial: Correct types 2012-05-09 00:41:31 -03:00
Kconfig Bluetooth: Fix Kconfig help description 2012-02-29 18:50:25 +02:00
l2cap_core.c Bluetooth: Fix a redundant and problematic incoming MTU check 2012-05-16 16:13:37 -03:00
l2cap_sock.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth 2012-05-16 16:11:44 -03:00
lib.c Bluetooth: Add logging functions bt_info and bt_err 2012-02-17 11:33:17 +02:00
Makefile Bluetooth: Always compile SCO and L2CAP in Bluetooth Core 2011-12-21 02:21:08 -02:00
mgmt.c Bluetooth: Fixed checkpatch warnings 2012-05-09 03:06:09 -03:00
sco.c Bluetooth: Add dst_type parameter to hci_connect 2012-05-09 01:40:45 -03:00
smp.c Bluetooth: Correct ediv in SMP 2012-05-09 00:41:30 -03:00