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

[BUG] minimal mDNS responses / announcements for unique records (SRV, TXT) don't set the cache-flush bit for all cases #32792

Closed
Emill opened this issue Mar 29, 2024 · 0 comments · Fixed by #32813

Comments

@Emill
Copy link

Emill commented Mar 29, 2024

Follow up for #23918 and #23933 (comment).

This should also be done for _matterc._udp (not only _matter._tcp). May I suggest to call SetCacheFlush(true) directly in SrvResponder::AddAllResponses and TxtResponder::AddAllResponses so that it becomes impossible to forget setting this flag. Apple's mDNSResponder and avahi sets this flag for SRV and TXT entries for service registrations.

The instance name is randomly generated and should thus be unique, so the cache-flush bit should be set. The main benefit of this is that it allows an optimization for mDNS clients such that they do not have to send a new query if it already has a cached entry (typically from the "Additional Records" section from a previous PTR query). From RFC 6762:

An additional efficiency optimization SHOULD be performed when a
Multicast DNS response is received containing a unique answer (as
indicated by the cache-flush bit being set, described in Section
10.2, "Announcements to Flush Outdated Cache Entries"). In this
case, there is no need for the querier to continue issuing a stream
of queries with exponentially increasing intervals, since the receipt
of a unique answer is a good indication that no other answers will be
forthcoming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant