You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2021/07/21 09:42:23 UTC
[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #1001: host/l2cap: send command reject in L2CAP disc req for invalid CID
rymanluk commented on a change in pull request #1001:
URL: https://github.com/apache/mynewt-nimble/pull/1001#discussion_r673822701
##########
File path: nimble/host/src/ble_l2cap_sig.c
##########
@@ -1543,6 +1543,7 @@ ble_l2cap_sig_disc_req_rx(uint16_t conn_handle, struct ble_l2cap_sig_hdr *hdr,
if (!chan || (le16toh(req->scid) != chan->dcid)) {
os_mbuf_free_chain(txom);
ble_hs_unlock();
+ ble_l2cap_sig_reject_invalid_cid_tx(conn_handle, hdr->identifier, req->dcid, req->scid);
Review comment:
actually we are doing here wrong.
as per Bluetooth specification "If the DCID is not recognized by the
receiver of this message, an L2CAP_COMMAND_REJECT_RSP
packet with ‘invalid CID’ result code shall be sent in response. If the
receiver finds a DCID match but the SCID fails to find the same match, the
request should be silently discarded"
That means - if (!chan) { we should send REJECT}
if ((le16toh(req->scid) != chan->dcid)) -> we should silently discard a message
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org