fix(nimble): Fixed authcomplete failure caused by a mismatch in the c1 value

This commit is contained in:
Darshan Dobariya
2023-12-05 14:17:21 +05:30
parent cafd9eed80
commit 0acd31ac01
+3 -1
View File
@@ -181,6 +181,8 @@ ble_hs_hci_evt_dispatch_find(uint8_t event_code)
return NULL;
}
static const uint8_t ble_hs_conn_null_addr[6];
static ble_hs_hci_evt_le_fn *
ble_hs_hci_evt_le_dispatch_find(uint8_t event_code)
{
@@ -451,7 +453,7 @@ ble_hs_hci_evt_le_enh_conn_complete(uint8_t subevent, const void *data,
#if MYNEWT_VAL(BLE_HOST_BASED_PRIVACY)
/* RPA needs to be resolved here, as controller is not aware of the
* address is RPA in Host based RPA */
if (ble_host_rpa_enabled()) {
if (ble_host_rpa_enabled() && !memcmp(evt.local_rpa, ble_hs_conn_null_addr, 6) == 0) {
uint8_t *local_id_rpa = ble_hs_get_rpa_local();
memcpy(evt.local_rpa, local_id_rpa, BLE_DEV_ADDR_LEN);
}