You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2022/02/24 14:33:15 UTC
[mynewt-nimble] 05/10: nimble/ll: Fix verification on periodic adv enable
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
commit 646f7757fdd1a4f8ac5a0fcb7b1dcc0ff353a145
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Wed Feb 23 16:59:52 2022 +0100
nimble/ll: Fix verification on periodic adv enable
Enabling periodic advertising before parameters are set should return
"command disallowed" since we do no supprt vendor-specific default
parameters.
This fixes HCI/DDI/BV-07-C.
---
nimble/controller/src/ble_ll_adv.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/nimble/controller/src/ble_ll_adv.c b/nimble/controller/src/ble_ll_adv.c
index d8d251b..d65789a 100644
--- a/nimble/controller/src/ble_ll_adv.c
+++ b/nimble/controller/src/ble_ll_adv.c
@@ -3969,6 +3969,10 @@ ble_ll_adv_periodic_enable(const uint8_t *cmdbuf, uint8_t len)
return BLE_ERR_CMD_DISALLOWED;
}
+ if (!(advsm->flags & BLE_LL_ADV_SM_FLAG_PERIODIC_CONFIGURED)) {
+ return BLE_ERR_CMD_DISALLOWED;
+ }
+
/* If Enable is set to 0x01 and the length of the periodic advertising
* data is greater than the maximum that the Controller can transmit
* within the chosen periodicadvertising interval, the Controller shall