-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Linux] DnssdImpl: rework avahi implementation (#26397)
* InetInterface: add IsLoopback() to InterfaceIterator and InterfaceAddressIterator Required for improving dns-sd avahi based implementation * [Linux] DnssdImpl: rework avahi implementation This commit fixes two problems with the previous avahi based dns-sd implementation: - Publishing more than one service at the same time did not work. This needs to be possible e.g. when a node is commissioned into multiple fabrics. The previous implementation falsely assumed that additional services can be added to already committed (=published) AvahiEntryGroup, which is not the case. An AvahiEntryGroup can only publish multiple services ALL AT ONCE. The new implementation creates a new AvahiEntryGroup per service, on demand. - The previous implementation took ownership of the platform-global default hostname, (by overwriting it). This is not a good idea because the default hostname is usually of relevance for other non-matter services on a given Linux platform. The new implementation establishes the matter-mandated MAC-derived hostname separately and explicitly adds interface addresses. * DnssdImpl.cpp: avoid shadowing local vars to prevent warning/error * DnssdImpl.cpp: make work without INET_CONFIG_ENABLE_IPV4 * DnssdImpl.cpp: fix missing error variable assignment in SuccessOrExit() (found by code-lints)
- Loading branch information
Showing
4 changed files
with
156 additions
and
77 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