-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[srp-server] process completed update from proxy from taskelt (#9398)
This commit enhances `Srp::Server` to process and commit the completed `UpdateMetadata` entries (signaled by the "proxy service handler" calling `HandleServiceUpdateResult()`) from a `Tasklet`. This change is helpful in the case where the `HandleServiceUpdateResult ()` callback is invoked directly from the "update service handler" itself. While `Srp::Server` can handle this situation, the change makes it easier for platform implementations of advertising proxy. In particular, it addresses an issue with the `otbr` advertising proxy implementation. This implementation can potentially access an already freed `Host` object. This can happen because the implementation may hold on to the `Host` object while iterating over its `Service` entries as advertising an earlier `Service` of the same `Host` may fail immediately and invoke the callback directly. This would then cause the `Host` to be freed by `Srp::Server`.
- Loading branch information
Showing
4 changed files
with
88 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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