Bluetooth: L2CAP connectionless channels are only valid for BR/EDR
authorMarcel Holtmann <marcel@holtmann.org>
Thu, 3 Oct 2013 07:03:39 +0000 (00:03 -0700)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 3 Oct 2013 07:13:30 +0000 (10:13 +0300)
When receiving connectionless packets on a LE connection, just drop
the packet. There is no concept of connectionless channels for LE.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/l2cap_core.c

index 65c53719b76ce89c0b204d403b21b136ed45d5b0..102a510a153ad89d8f8050138f33157ef90debce 100644 (file)
@@ -6403,8 +6403,12 @@ done:
 static void l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm,
                                  struct sk_buff *skb)
 {
+       struct hci_conn *hcon = conn->hcon;
        struct l2cap_chan *chan;
 
+       if (hcon->type != ACL_LINK)
+               goto drop;
+
        chan = l2cap_global_chan_by_psm(0, psm, conn->src, conn->dst);
        if (!chan)
                goto drop;