OSDN Git Service

Only add RPA devices to the resolving list
authorNitin Arora <niarora@codeaurora.org>
Sat, 8 Oct 2016 00:30:07 +0000 (17:30 -0700)
committerGerrit - the friendly Code Review server <code-review@localhost>
Thu, 20 Oct 2016 01:27:46 +0000 (18:27 -0700)
This change makes sure that the remote devices which are being
added to the resolving list are RPAs and they do not have a public
address type.
This is needed to address the new privacy specification where,
by default, the controller only searches for RPAs in the
advertisements if a corresponding entry is present in the
resolving list.

CRs-Fixed: 1080023
Change-Id: I7a925c9faf8004ce631bc73b5a3ae15af8d42796

stack/btm/btm_ble_privacy.c

index c8fe541..f4765d8 100644 (file)
@@ -775,8 +775,8 @@ BOOLEAN btm_ble_resolving_list_load_dev(tBTM_SEC_DEV_REC *p_dev_rec)
 
     /* only add RPA enabled device into resolving list */
     if (p_dev_rec != NULL && /* RPA is being used and PID is known */
-       ((p_dev_rec->ble.key_type & BTM_LE_KEY_PID) != 0 ||
-       (p_dev_rec->ble.key_type & BTM_LE_KEY_LID) != 0))
+       ((p_dev_rec->ble.key_type & BTM_LE_KEY_PID) != 0) &&
+       (BTM_BLE_IS_RESOLVE_BDA(p_dev_rec->bd_addr) && p_dev_rec->ble.ble_addr_type != BLE_ADDR_PUBLIC))
     {
         if (!(p_dev_rec->ble.in_controller_list & BTM_RESOLVING_LIST_BIT) &&
             btm_ble_brcm_find_resolving_pending_entry(p_dev_rec->bd_addr,