Bluetooth: controller: Fix network privacy with resolution disabled

When address resolution is disabled, an identity address has
been added into the resolving list with peer IRK, and device
privacy has not been selected for the peer device then
connection indication shall not be sent to the peer that is
advertising using its identity address.

Fixes #24731.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2021-02-12 09:58:36 +05:30 committed by Anas Nashif
commit fde9ba5c43
3 changed files with 10 additions and 2 deletions

View file

@ -1117,6 +1117,10 @@ static inline bool isr_scan_init_adva_check(struct lll_scan *lll,
/* Only applies to initiator with no whitelist */
if (rl_idx != FILTER_IDX_NONE) {
return (rl_idx == lll->rl_idx);
} else if (!ull_filter_lll_rl_addr_allowed(pdu->tx_addr,
pdu->adv_ind.addr,
&rl_idx)) {
return false;
}
#endif /* CONFIG_BT_CTLR_PRIVACY */
return ((lll->adv_addr_type == pdu->tx_addr) &&

View file

@ -1015,6 +1015,10 @@ static inline bool isr_scan_init_adva_check(struct lll_scan *lll,
/* Only applies to initiator with no whitelist */
if (rl_idx != FILTER_IDX_NONE) {
return (rl_idx == lll->rl_idx);
} else if (!ull_filter_lll_rl_addr_allowed(pdu->tx_addr,
pdu->adv_ind.addr,
&rl_idx)) {
return false;
}
#endif /* CONFIG_BT_CTLR_PRIVACY */
return ((lll->adv_addr_type == pdu->tx_addr) &&

View file

@ -757,10 +757,10 @@ bool ull_filter_lll_rl_addr_allowed(uint8_t id_addr_type, uint8_t *id_addr, uint
{
uint8_t i, j;
/* If AR is disabled or we matched an IRK then we're all set. No hw
/* We matched an IRK then we're all set. No hw
* filters are used in this case.
*/
if (!rl_enable || *rl_idx != FILTER_IDX_NONE) {
if (*rl_idx != FILTER_IDX_NONE) {
return true;
}