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 <bbaa@demant.com>
This commit is contained in:
Babak Arisian 2025-05-14 17:00:15 +02:00 committed by Benjamin Cabé
commit 021c96dcad

View file

@ -160,7 +160,7 @@ void ull_periph_setup(struct node_rx_pdu *rx, struct node_rx_ftr *ftr,
if ((lll->data_chan_count < CHM_USED_COUNT_MIN) ||
(lll->data_chan_hop < CHM_HOP_COUNT_MIN) ||
(lll->data_chan_hop > CHM_HOP_COUNT_MAX) ||
!lll->interval) {
!IN_RANGE(lll->interval, BT_HCI_LE_INTERVAL_MIN, BT_HCI_LE_INTERVAL_MAX)) {
invalid_release(&adv->ull, lll, link, rx);
return;