Skip to content

Commit 7316d87

Browse files
authored
Merge pull request apache#75 from sjanc/zero_irk
nimble/ll: Fix creating connections with all-zero IRK
2 parents b173619 + 35e7a16 commit 7316d87

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

nimble/controller/src/ble_ll_conn.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2770,10 +2770,17 @@ ble_ll_conn_is_peer_adv(uint8_t addr_type, uint8_t *adva, int index)
27702770
case BLE_HCI_CONN_PEER_ADDR_RANDOM:
27712771
if (addr_type == connsm->peer_addr_type) {
27722772
#if (MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PRIVACY) == 1)
2773-
/* Peer uses its identity address. Let's verify privacy mode*/
2773+
/* Peer uses its identity address. Let's verify privacy mode.
2774+
*
2775+
* Note: Core Spec 5.0 Vol 6, Part B
2776+
* If the Host has added the peer device to the resolving list
2777+
* with an all-zero peer IRK, the Controller shall only accept
2778+
* the peer's identity address.
2779+
*/
27742780
if (ble_ll_resolv_enabled()) {
27752781
rl = ble_ll_resolv_list_find(adva, addr_type);
2776-
if (rl && (rl->rl_priv_mode == BLE_HCI_PRIVACY_NETWORK)) {
2782+
if (rl && (rl->rl_priv_mode == BLE_HCI_PRIVACY_NETWORK) &&
2783+
ble_ll_resolv_irk_nonzero(rl->rl_peer_irk)) {
27772784
return 0;
27782785
}
27792786
}

0 commit comments

Comments
 (0)