This is an automated email from the ASF dual-hosted git repository. andk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push: new deb78222b nimble/ll: Fix non-connectable PDUs handling for initiator deb78222b is described below commit deb78222b50588bf3a5b5b21d4c1d1a8b90522f7 Author: Andrzej Kaczmarek <andrzej.kaczma...@codecoup.pl> AuthorDate: Sun Sep 15 17:02:47 2024 +0200 nimble/ll: Fix non-connectable PDUs handling for initiator We should not reply on ADV_NONCONN_IND and SCAN_IND as initiator - those are not connectable so we'll just get connection failed to be established error. --- nimble/controller/src/ble_ll_scan.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nimble/controller/src/ble_ll_scan.c b/nimble/controller/src/ble_ll_scan.c index 5530eabb2..670f6b38c 100644 --- a/nimble/controller/src/ble_ll_scan.c +++ b/nimble/controller/src/ble_ll_scan.c @@ -1621,8 +1621,16 @@ ble_ll_scan_rx_isr_end(struct os_mbuf *rxpdu, uint8_t crcok) switch (pdu_type) { case BLE_ADV_PDU_TYPE_ADV_IND: case BLE_ADV_PDU_TYPE_ADV_DIRECT_IND: + rc = ble_ll_scan_rx_isr_end_on_adv(pdu_type, rxbuf, hdr, &addrd); + break; case BLE_ADV_PDU_TYPE_ADV_NONCONN_IND: case BLE_ADV_PDU_TYPE_ADV_SCAN_IND: +#if MYNEWT_VAL(BLE_LL_ROLE_CENTRAL) + if (scansm->scanp->scan_type == BLE_SCAN_TYPE_INITIATE) { + rc = -1; + break; + } +#endif rc = ble_ll_scan_rx_isr_end_on_adv(pdu_type, rxbuf, hdr, &addrd); break; case BLE_ADV_PDU_TYPE_SCAN_RSP: