From: Johan Hedberg Date: Wed, 16 Oct 2013 08:37:00 +0000 (+0300) Subject: Bluetooth: Ignore A2MP data on non-BR/EDR links X-Git-Tag: v3.13-rc1~105^2~23^2^2~4^2~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07e307f807fecf056f0f9024ade4c0187159c46b;p=thirdparty%2Flinux.git Bluetooth: Ignore A2MP data on non-BR/EDR links 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 Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c index fe32a334a52d8..efcd108822c43 100644 --- a/net/bluetooth/a2mp.c +++ b/net/bluetooth/a2mp.c @@ -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");