Skip to content

Commit

Permalink
nimble/eatt: Handle MTU request over enhanced bearer
Browse files Browse the repository at this point in the history
Handle ATT MTU request over enhanced bearer.
This request shall return Request Not
Supported error (0x06)
  • Loading branch information
szymon-czapracki committed Jan 23, 2025
1 parent cf947cd commit 4e90bdc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions nimble/host/src/ble_att.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,10 @@ bool
ble_eatt_supported_req(uint8_t opcode)
{
switch (opcode) {
/* EATT does not support MTU request,
* but we must handle this request with proper error response.
*/
case BLE_ATT_OP_MTU_REQ:
case BLE_ATT_OP_WRITE_CMD:
case BLE_ATT_OP_FIND_INFO_REQ:
case BLE_ATT_OP_FIND_TYPE_VALUE_REQ:
Expand Down
2 changes: 1 addition & 1 deletion nimble/host/src/ble_att_svr.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ ble_att_svr_rx_mtu(uint16_t conn_handle, uint16_t cid, struct os_mbuf **rxom)
mtu = 0;

if (cid != BLE_L2CAP_CID_ATT) {
/*TODO */
/* This operation is not supported over enhanced ATT bearer */
return BLE_HS_ENOTSUP;
}

Expand Down

0 comments on commit 4e90bdc

Please sign in to comment.