Skip to content
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

[nrf fromtree] OpenThread: Clear SRP host and services during RevertConfiguration #573

Merged
merged 1 commit into from
Mar 19, 2025

Conversation

adigie
Copy link
Member

@adigie adigie commented Mar 14, 2025

  • Postpone RevertConfiguration until OpenThread is initialized.
  • Clear SRP host and services before reverting dataset.
  • Abort revert if creating new backup.

Copy link
Contributor

@Damian-Nordic Damian-Nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think now that you delay RevertConfiguration, it needs to be considered what happens if BackupConfiguration is called before kServerReady is processed (which may happen if SRP response gets delayed or is lost and we receive a Matter command to modify Thread network). Then we should probably do the revert without waiting for the SRP response.

// must be restored on the boot. If there's no backup, the below function is a no-op.
RevertConfiguration();
// must be restored.
if (BackupExists())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this check is necessary. RevertConfiguration takes care on its own whether the backup exists or not and kServerReady is generated only once per boot, so mRevertOnStartup seems redundant, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline - we will keep mRevertOnStartup to mark that during initialization backup was present. Additionally, we have to clear it when creating a new backup.

@adigie adigie force-pushed the clear-srp-after-reset branch 2 times, most recently from 66ba0cc to 0003f04 Compare March 18, 2025 07:58
@adigie adigie force-pushed the clear-srp-after-reset branch from 0003f04 to 1a76106 Compare March 18, 2025 09:36
…onfiguration (#38053)

* Postpone `RevertConfiguration` until Server is initialized.
* Clear SRP host and services before reverting dataset.
* Abort revert if creating new backup.

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
(cherry picked from commit 132a7a8aed99b6f8dda15c749bc2b182bf82ffed)
Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
@adigie adigie force-pushed the clear-srp-after-reset branch from 1a76106 to e043125 Compare March 18, 2025 14:08
@adigie adigie changed the title [nrf toup] OpenThread: Clear SRP host and services during RevertConfiguration [nrf fromtree] OpenThread: Clear SRP host and services during RevertConfiguration Mar 18, 2025
@nordicjm nordicjm merged commit 51b36dd into nrfconnect:master Mar 19, 2025
9 checks passed
@adigie adigie deleted the clear-srp-after-reset branch March 19, 2025 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants