Skip to content

Commit

Permalink
Bluetooth: Fix expiring RPA when different local identities are used
Browse files Browse the repository at this point in the history
When advertising with different identities we need to flag any
programmed RPA as invalid if it was generated using a different
identity.

Fixes zephyrproject-rtos#16893

Signed-off-by: Johan Hedberg <[email protected]>
  • Loading branch information
Johan Hedberg authored and jhedberg committed Jun 19, 2019
1 parent 72e8010 commit 4e89d29
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions subsys/bluetooth/host/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5348,6 +5348,10 @@ int bt_le_adv_start_internal(const struct bt_le_adv_param *param,
set_param.max_interval = sys_cpu_to_le16(param->interval_max);
set_param.channel_map = 0x07;

if (bt_dev.adv_id != param->id) {
atomic_clear_bit(bt_dev.flags, BT_DEV_RPA_VALID);
}

/* Set which local identity address we're advertising with */
bt_dev.adv_id = param->id;
id_addr = &bt_dev.id_addr[param->id];
Expand Down

0 comments on commit 4e89d29

Please sign in to comment.