-
Notifications
You must be signed in to change notification settings - Fork 43
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
Please update/clarify/justify recommendations for IPv4-only vs. any-protocol #62
Comments
Background There are several lookups that we might be asked to carry out:
Our goals and constraints are:
For gethostbyname, by default
For gethostbyaddr, by default Distributions typically only enable Reasons to use mdns instead of mdns4 If we used
Reasons to use mdns4 instead of mdns If we used
This is exacerbated by older mDNS implementations like 2008-era Windows and 2008-era embedded devices, which often only advertised IPv4 addresses (or perhaps even only had IPv4 addresses), although newer implementations should hopefully all be dual-stack-capable. |
A relevant Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=466014 |
One thing that might potentially help us to get out of this hole is to observe that the case where we get extra delays is exactly the case where the application does the lookup with AF_INET6, waits for failure, and then retries with AF_INET. If the application does this, then current glibc doesn't return the scope ID, which means IPv6 link-local addresses (the fe80:: range) don't work anyway. So perhaps logic like this would be useful as a default?
|
Hello. I gathered lots of information on glibc resolver issues, getaddrinfo API limitations and bugs including totally wrong AI_ADDRCONFIG behavior, dual-stack application testing and DNSSEC considerations. But this is not a topic for a single ticket, so please reach out to me (e.g. on IRC Freenode) if you're interested in my feedback. |
Absent other logic (which may be smarter); I would suggest that in reality you could reduce the timeout to 1 second (at the very least for IPv6) without much ill effect. Which would probably significantly improve the situation. I also wonder if we could hack in some smarts (would probably have to be on the avahi-daemon side) to timeout quickly the IPv6 for a given hostname if we already have an IPv4 host in the cache. |
If we introduced a new config file (#65) is there anything from this issue that could go in there? |
Would returning just a first response of either v4 or v6 be an option? That seems like it would be fairly straightforward to add, sending both queries to Avahi and waiting for the first FD to have data. It isn't quite correct behaviour for (My use case was a little embedded board with only ipv6 link local addressing to avoid extra ipv4 config, was surprised that nss-mdns wasn't working with ipv6 out of the box) |
The Debian package for nss-mdns gets occasional requests to enable
mdns{_minimal,}
instead ofmdns4{_minimal,}
by default. It isn't clear that obeying those requests would actually be a good thing, but it would be useful for the recommendations and their reasons to be written down in the upstream documentation, where they can be updated in-place if the facts change.I'll reply to this issue report with my understanding of the situation.
The text was updated successfully, but these errors were encountered: