Skip to content

Commit

Permalink
nimble/host: remove unnecessarry opcode check in ble_eatt_l2cap_event_fn
Browse files Browse the repository at this point in the history
This check caused l2cap disconnection when opcode included
in received data was write command which is supported and can be used
on eatt. Also, the comment seemed irrelevant. Fixes GATT/SR/GAW/BV-01-C
  • Loading branch information
piotrnarajowski committed Sep 20, 2024
1 parent caecb2c commit 392b0b5
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions nimble/host/src/ble_eatt.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,16 +268,6 @@ ble_eatt_l2cap_event_fn(struct ble_l2cap_event *event, void *arg)
opcode = event->receive.sdu_rx->om_data[0];
if (ble_att_is_response_op(opcode)) {
ble_npl_eventq_put(ble_hs_evq_get(), &eatt->wakeup_ev);
} else if (!ble_att_is_request_op(opcode)) {
/* As per BLE 5.4 Standard, Vol. 3, Part F, section 5.3.2
* (ENHANCED ATT BEARER L2CAP INTEROPERABILITY REQUIREMENTS:
* Channel Requirements):
* All packets sent on this L2CAP channel shall be Attribute PDUs.
*
* Disconnect peer with invalid behavior.
*/
ble_l2cap_disconnect(eatt->chan);
return BLE_HS_EREJECT;
}

assert (!ble_gap_conn_find(event->receive.conn_handle, &desc));
Expand Down

0 comments on commit 392b0b5

Please sign in to comment.