mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-11-06 12:32:46 +00:00
NimBLE : Change peer_addr type to PUBLIC in case of Host based privacy
- When Identity of peer is resolved and peer address is RPA then NimBLE stack changes the peer_addr type to PUBLIC_ID(0x02); in Host based privacy it should not be done as it can result in mismatch while comparing stored addresses especially in case of CCCD storage.
This commit is contained in:
@@ -538,6 +538,11 @@ ble_sm_persist_keys(struct ble_sm_proc *proc)
|
||||
case BLE_ADDR_PUBLIC:
|
||||
case BLE_ADDR_PUBLIC_ID:
|
||||
conn->bhc_peer_addr.type = BLE_ADDR_PUBLIC_ID;
|
||||
#if MYNEWT_VAL(BLE_HOST_BASED_PRIVACY)
|
||||
/* In case of Host based privacy, we should not be changing
|
||||
* peer address type to BLE_ADDR_PUBLIC_ID */
|
||||
conn->bhc_peer_addr.type = BLE_ADDR_PUBLIC;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case BLE_ADDR_RANDOM:
|
||||
|
||||
Reference in New Issue
Block a user