mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-09 02:30:06 +00:00
nimble/ll: Fix peer address check with privacy
We should explicitly chceck if AdvA is identity instead of just comparing address types. Comparing address types can give incorrect result if peer identity address is static random since both static random and RPA are random addresses.
This commit is contained in:
@@ -2524,7 +2524,7 @@ ble_ll_conn_is_peer_adv(uint8_t addr_type, uint8_t *adva, int index)
|
||||
/* Fall-through intentional */
|
||||
case BLE_HCI_CONN_PEER_ADDR_PUBLIC:
|
||||
case BLE_HCI_CONN_PEER_ADDR_RANDOM:
|
||||
if (addr_type == connsm->peer_addr_type) {
|
||||
if (ble_ll_addr_is_id(adva, addr_type)) {
|
||||
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PRIVACY)
|
||||
/* Peer uses its identity address. Let's verify privacy mode.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user