Skip to content

Commit 021c96d

Browse files
babrsnkartben
authored andcommitted
Bluetooth: controller: Correct validation for CONNECT_IND interval
Previously, the interval was only checked for non-zero. Now it is validated to be within the allowed range (BT_HCI_LE_INTERVAL_MIN to BT_HCI_LE_INTERVAL_MAX) to avoid invalid values. Signed-off-by: Babak Arisian <[email protected]>
1 parent 598987e commit 021c96d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/bluetooth/controller/ll_sw/ull_peripheral.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void ull_periph_setup(struct node_rx_pdu *rx, struct node_rx_ftr *ftr,
160160
if ((lll->data_chan_count < CHM_USED_COUNT_MIN) ||
161161
(lll->data_chan_hop < CHM_HOP_COUNT_MIN) ||
162162
(lll->data_chan_hop > CHM_HOP_COUNT_MAX) ||
163-
!lll->interval) {
163+
!IN_RANGE(lll->interval, BT_HCI_LE_INTERVAL_MIN, BT_HCI_LE_INTERVAL_MAX)) {
164164
invalid_release(&adv->ull, lll, link, rx);
165165

166166
return;

0 commit comments

Comments
 (0)