diff mbox series

[BlueZ,1/3] shared/att: Fix accepting Exchange MTU on EATT bearer

Message ID 20210825211415.1057804-1-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ,1/3] shared/att: Fix accepting Exchange MTU on EATT bearer | expand

Commit Message

Luiz Augusto von Dentz Aug. 25, 2021, 9:14 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

If remote send Exchange MTU it shall fail as the MTU negotiation shall
happen over L2CAP signalling not ATT for those channels.
---
 src/shared/att.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/shared/att.c b/src/shared/att.c
index ccc753c4e..665d7f4b8 100644
--- a/src/shared/att.c
+++ b/src/shared/att.c
@@ -962,7 +962,8 @@  static void handle_notify(struct bt_att_chan *chan, uint8_t *pdu,
 		 * link since the MTU size is negotiated using L2CAP channel
 		 * configuration procedures.
 		 */
-		if (bt_att_get_link_type(att) == BT_ATT_BREDR) {
+		if (bt_att_get_link_type(att) == BT_ATT_BREDR ||
+				chan->type == BT_ATT_EATT) {
 			switch (opcode) {
 			case BT_ATT_OP_MTU_REQ:
 				goto not_supported;