-
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
Revisit MDNS_MINIMAL reverse lookup #46
Comments
The harm is that many apps and services do reverse lookups (gethostbyaddr) on arbitrary IP addresses (perhaps local, perhaps not, and there's no particularly good way to tell). If there is no reverse DNS for a particular IP address, and there is nobody on the local LAN advertising a PTR record for that IP address, then nss-mdns will block for several seconds before it gives up and returns control to the application. For forward resolution (gethostbyname) there's an obvious default - if the name is in Reverse resolution seems less critical than forward (you need forward resolution to connect to services, but you only need reverse resolution for logging or debugging), so if an app does it anyway, distributions don't want a default that will add significant time delays for little benefit. When users find that installing nss-mdns makes their app slow, they will normally blame nss-mdns, not their app. |
More concretely, one of the goals of limiting reverse resolution to link-local IPv4 is: suppose I run Similarly, if something like SpamAssassin is using reverse DNS to check whose an IP address is, there's little point in asking my local LAN if they know; they probably don't, and it will just delay processing. |
I agree with the above. One possible option would be to do a cache only or all_for_now style response. And never wait. And only for IP addresses in a subnet on a local interface (otherwise we open up some security issues too - it also would potentially leak info about what DNS names / IPS people are looking up) |
That's a good point about information leaks... although if you're on a subnet with someone, you can probably already see their DNS lookups unless they have taken steps to use Tor or similar (DNSSEC doesn't protect confidentiality, only integrity), so you can already know what IP addresses they're looking up. Switched networks mitigate that but don't prevent it, since switches often fail open when flooded. While looking at updating Debian's nss-mdns package (from Lennart's 0.10 to this fork) I wondered whether the reverse change would be useful: make |
FYI, in Debian, I dropped
|
I think #65 would address this issue. |
It is not clear why only minimal mode has this:
/* Only query for 169.254.0.0/16 IPv4 in minimal mode */
Is it something we can remove? I don't know what harm there is in handling more reverse queries. Probably a latency issue?
The text was updated successfully, but these errors were encountered: