-
Notifications
You must be signed in to change notification settings - Fork 735
[nrf fromtree] bluetooth: host: Fix stale RPA usage after invalidation #3565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
carlescufi
merged 1 commit into
nrfconnect:main
from
PavelVPV:fix_rpa_rotation_after_being_invalidated
Dec 2, 2025
Merged
[nrf fromtree] bluetooth: host: Fix stale RPA usage after invalidation #3565
carlescufi
merged 1 commit into
nrfconnect:main
from
PavelVPV:fix_rpa_rotation_after_being_invalidated
Dec 2, 2025
+5
−2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NordicBuilder
added a commit
to NordicBuilder/sdk-nrf
that referenced
this pull request
Dec 1, 2025
Automatically created by action-manifest-pr GH action from PR: nrfconnect/sdk-zephyr#3565 Signed-off-by: Nordic Builder <[email protected]>
Contributor
Author
|
|
b5b42ac to
f3fa678
Compare
NordicBuilder
added a commit
to NordicBuilder/sdk-nrf
that referenced
this pull request
Dec 1, 2025
Automatically created by action-manifest-pr GH action from PR: nrfconnect/sdk-zephyr#3565 Signed-off-by: Nordic Builder <[email protected]>
f3fa678 to
3e2e13e
Compare
NordicBuilder
added a commit
to NordicBuilder/sdk-nrf
that referenced
this pull request
Dec 1, 2025
Automatically created by action-manifest-pr GH action from PR: nrfconnect/sdk-zephyr#3565 Signed-off-by: Nordic Builder <[email protected]>
kapi-no
approved these changes
Dec 2, 2025
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]> (cherry picked from commit 6da559f56544aa2ed1c93071ffad203a523d432c)
3e2e13e to
5c96acb
Compare
Contributor
Author
|
Changed to |
NordicBuilder
added a commit
to NordicBuilder/sdk-nrf
that referenced
this pull request
Dec 2, 2025
Automatically created by action-manifest-pr GH action from PR: nrfconnect/sdk-zephyr#3565 Signed-off-by: Nordic Builder <[email protected]>
alwa-nordic
approved these changes
Dec 2, 2025
Contributor
alwa-nordic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cherry pick looks correct and is a bug fix.
NordicBuilder
added a commit
to NordicBuilder/sdk-nrf
that referenced
this pull request
Dec 2, 2025
Automatically created by action-manifest-pr GH action from PR: nrfconnect/sdk-zephyr#3565 Signed-off-by: Nordic Builder <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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 zephyrproject-rtos/zephyr#98117.
(cherry picked from commit a63f51b536358e3b0f7e196015e4d88c594d7b12)
Upstream PR #: 100295