diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2013-10-16 04:37:00 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2013-10-16 04:41:13 -0400 |
commit | 07e307f807fecf056f0f9024ade4c0187159c46b (patch) | |
tree | 138640e20d3f1ed494e2c43efac87a0a06afb3bb | |
parent | a521149a0df24cc250aa1173a9964dd8a728d772 (diff) |
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 <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r-- | net/bluetooth/a2mp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c index fe32a334a52d..efcd108822c4 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, | |||
836 | { | 836 | { |
837 | struct amp_mgr *mgr; | 837 | struct amp_mgr *mgr; |
838 | 838 | ||
839 | if (conn->hcon->type != ACL_LINK) | ||
840 | return NULL; | ||
841 | |||
839 | mgr = amp_mgr_create(conn, false); | 842 | mgr = amp_mgr_create(conn, false); |
840 | if (!mgr) { | 843 | if (!mgr) { |
841 | BT_ERR("Could not create AMP manager"); | 844 | BT_ERR("Could not create AMP manager"); |