OSDN Git Service

btm_ble_conn_complete: use pseudo address type together with pseudo address
authorJakub Pawlowski <jpawlowski@google.com>
Wed, 25 Sep 2019 11:39:33 +0000 (13:39 +0200)
committerJakub Pawlowski <jpawlowski@google.com>
Thu, 26 Sep 2019 08:53:59 +0000 (10:53 +0200)
Currently, when the pseudo address type doesn't match the received address
type, we can end up modifying the security record with bad address type
in call to btm_ble_connected.

Bug: 141186673
Bug: 139825901
Bug: 140847046
Change-Id: I7ea60dde6e0876a5e757006024490a2cc155a370
(cherry picked from commit c664929ed00cb38ad176b96a93a4071331607e15)

stack/btm/btm_ble_connection_establishment.cc

index c0d7791..77bc00f 100644 (file)
@@ -159,6 +159,7 @@ void btm_ble_conn_complete(uint8_t* p, UNUSED_ATTR uint16_t evt_len,
         if (!btm_ble_init_pseudo_addr(match_rec, bda)) {
           /* assign the original address to be the current report address */
           bda = match_rec->ble.pseudo_addr;
+          bda_type = match_rec->ble.ble_addr_type;
         } else {
           bda = match_rec->bd_addr;
         }