-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mdns] fix bug that avahi may publish redundant meshcop services (#1104)
Avahi may rename the meshcop service and publish it when there's a name conflict. However, our current logic has a bug that it may publish redundant meshcop services after some renaming. For example there are two BRs on the infra link: - BR1 starts. It publishes instance._meshcop._udp. - BR2 starts. It publishes instance #1._meshcop._udp. - BR1 stops. It unpublishes instance._meshcop._udp. - BR2 wants to update the existing meshcop service. However, it actually publishes a new service instance._meshcop._udp. There are two meshcop services existing at the same time both published by BR2. To fix this bug, we will keep track of the original name in the avahi publisher. When we call PublishService, we should always pass in the original name and let the publisher handle the renaming. In this way we will be able to find the wanted service when updating it or unpublishing it.
- Loading branch information
Showing
3 changed files
with
30 additions
and
18 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