Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08196628 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Christine Hallstrom
Browse files

Clear identity bit when passing address to filter

Legacy stack kept Identity Address Type without the identity bit set.
It is later passed without any masking to "Add to accept list", "add to
resolving list", and VSC filter command. All these commands specify that
the identity bit should not be set in related specifications.

This is a CP with partial revert of aosp/2030646.

Test: manual test with DCK application
Bug: 201255908
Bug: 280811285
Change-Id: Id68e81a6706ac40d7394e2803ec3339a7bc44a0a
Merged-In: Id68e81a6706ac40d7394e2803ec3339a7bc44a0a
parent a1273064
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -648,7 +648,7 @@ void BTM_LE_PF_set(tBTM_BLE_PF_FILT_INDEX filt_index,
      case BTM_BLE_PF_ADDR_FILTER: {
        tBLE_BD_ADDR target_addr;
        target_addr.bda = cmd.address;
        target_addr.type = to_ble_addr_type(cmd.addr_type);
        target_addr.type = (cmd.addr_type & (~BLE_ADDR_TYPE_ID_BIT));

        BTM_LE_PF_addr_filter(action, filt_index, target_addr,
                              base::DoNothing());
@@ -687,7 +687,8 @@ void BTM_LE_PF_set(tBTM_BLE_PF_FILT_INDEX filt_index,
          // Set the IRK
          tBTM_LE_PID_KEYS pid_keys;
          pid_keys.irk = cmd.irk;
          pid_keys.identity_addr_type = to_ble_addr_type(cmd.addr_type);
          pid_keys.identity_addr_type =
              (cmd.addr_type & (~BLE_ADDR_TYPE_ID_BIT));
          pid_keys.identity_addr = cmd.address;
          // Add it to the union to pass to SecAddBleKey
          tBTM_LE_KEY_VALUE le_key;