Bluetooth: Ignore A2MP data on non-BR/EDR links
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 16 Oct 2013 08:37:00 +0000 (11:37 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 16 Oct 2013 08:41:13 +0000 (01:41 -0700)
The A2MP CID is only valid for BR/EDR transports. We should ignore A2MP
data on non-BR/EDR links and refuse to create an amp_mgr object.

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

index fe32a33..efcd108 100644 (file)
@@ -836,6 +836,9 @@ struct l2cap_chan *a2mp_channel_create(struct l2cap_conn *conn,
 {
        struct amp_mgr *mgr;
 
+       if (conn->hcon->type != ACL_LINK)
+               return NULL;
+
        mgr = amp_mgr_create(conn, false);
        if (!mgr) {
                BT_ERR("Could not create AMP manager");