Commit a63f51b
committed
bluetooth: host: Fix stale RPA usage after invalidation
Add !BT_ADV_RPA_VALID check to force RPA regeneration when re-enabling
an advertising set after RPA rotation occurred while disabled.
The BT_ADV_RANDOM_ADDR_UPDATED flag was added to prevent unnecessary
address regeneration (RPA/NRPA) between bt_le_ext_adv_param_set() and
bt_le_ext_adv_start() calls. However, this revealed an issue:
When RPA rotation (le_force_rpa_timeout) occurs while an advertiser is
disabled, BT_ADV_RPA_VALID is cleared but the RPA is not regenerated.
On subsequent bt_le_ext_adv_start() without a new param_set() call:
- BT_ADV_RANDOM_ADDR_UPDATED is already cleared (from previous start)
- Without BT_PER_ADV_ENABLED, no regeneration occurs
- Stale RPA is used, violating privacy requirements
Add !BT_ADV_RPA_VALID check for both connectable and non-connectable
advertisers to ensure fresh RPA generation when the previous RPA was
invalidated while the advertiser was disabled.
Fixes regression introduced in #98117.
Signed-off-by: Pavel Vasilyev <[email protected]>1 parent d02cdc7 commit a63f51b
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1514 | 1514 | | |
1515 | 1515 | | |
1516 | 1516 | | |
1517 | | - | |
| 1517 | + | |
| 1518 | + | |
1518 | 1519 | | |
1519 | 1520 | | |
1520 | 1521 | | |
1521 | 1522 | | |
1522 | 1523 | | |
1523 | | - | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
1524 | 1527 | | |
1525 | 1528 | | |
1526 | 1529 | | |
| |||
0 commit comments