shared/att: Fix accepting Exchange MTU on EATT bearer
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 25 Aug 2021 15:58:07 +0000 (08:58 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:36 +0000 (19:08 +0530)
If remote send Exchange MTU it shall fail as the MTU negotiation shall
happen over L2CAP signalling not ATT for those channels.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/shared/att.c

index d66accf..cea2c96 100755 (executable)
@@ -985,7 +985,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;