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/19 09:14:18 UTC
[GitHub] [mynewt-nimble] KKopyscinski opened a new pull request #1001: host/l2cap: send command reject in L2CAP disc req for invalid CID
KKopyscinski opened a new pull request #1001:
URL: https://github.com/apache/mynewt-nimble/pull/1001
If ble_hs_conn_chan_find_by_scid fails to find channel, it means
that destination CID in L2CAP Disconnection Request is invalid.
Send L2CAP_COMMAND_REJECT_RSP with BLE_L2CAP_SIG_ERR_INVALID_CID
reason.
This is affecting L2CAP/LE/CFC/BV-23-C
--
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
[GitHub] [mynewt-nimble] KKopyscinski commented on pull request #1001: host/l2cap: send command reject in L2CAP disc req for invalid CID
Posted by GitBox <gi...@apache.org>.
KKopyscinski commented on pull request #1001:
URL: https://github.com/apache/mynewt-nimble/pull/1001#issuecomment-890835539
Added requested unit test
--
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
[GitHub] [mynewt-nimble] KKopyscinski merged pull request #1001: host/l2cap: send command reject in L2CAP disc req for invalid CID
Posted by GitBox <gi...@apache.org>.
KKopyscinski merged pull request #1001:
URL: https://github.com/apache/mynewt-nimble/pull/1001
--
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
[GitHub] [mynewt-nimble] KKopyscinski commented on a change in pull request #1001: host/l2cap: send command reject in L2CAP disc req for invalid CID
Posted by GitBox <gi...@apache.org>.
KKopyscinski commented on a change in pull request #1001:
URL: https://github.com/apache/mynewt-nimble/pull/1001#discussion_r673979906
##########
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:
I pushed the change but I checked it out again and turns out that this requires another one PTS issue ticket: TS says that lower tester should send invalid DCID, but PTS sends invalid SCID and valid DCID and expects disconnection. Of course what we got here is OK, it just allowed test to pass when it was wrong (before the push)
--
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
[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #1001: host/l2cap: send command reject in L2CAP disc req for invalid CID
Posted by GitBox <gi...@apache.org>.
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