Commit 65ee84b
committed
bluetooth: host: Fix stale RPA usage on advertiser restart
Regenerate RPA when re-enabling an advertising set if BT_ADV_RPA_VALID
flag was cleared while the advertiser was disabled.
When RPA rotation is triggered via le_force_rpa_timeout() while an
advertiser is disabled, the BT_ADV_RPA_VALID flag is cleared but the
RPA is not regenerated. Without this fix, re-enabling the advertiser
would use the stale RPA, violating Bluetooth privacy requirements.
Add !BT_ADV_RPA_VALID check to bt_le_ext_adv_start() for both
connectable and non-connectable advertisers to ensure fresh RPA
generation when needed.
This also ensures proper rpa_expired callback invocation for disabled
advertising sets per the bt_le_ext_adv_cb API contract.
Fixes regression introduced in #98117.
Signed-off-by: Pavel Vasilyev <[email protected]>1 parent d02cdc7 commit 65ee84b
1 file changed
+4
-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 | + | |
1524 | 1526 | | |
1525 | 1527 | | |
1526 | 1528 | | |
| |||
0 commit comments