On 10/09/2026 6:37 am, Vincent Lefevre wrote:
this is because getaddrinfo returns
only the IPv6 address. This is not a question of precedence.
Great. Do you see any benefits in disabling IPv6 on your machine?
Have you figured out if changes made in libc to handle the case of
SERVFAIL for A and success for AAAA queries affect nscd? Some security
issues are mentioned in the bug tracker.
Have you tried to stop nscd to compare if general impression is better?
I expect that changing DNS configuration should solve you issue. However
in the case of disasters when many network services are unreliable due
to slow links, suitable strategy to handle failures may be important.
When inspecting behavior of DNS servers, I suggest to suppress retries when
you invoke dig.
It seems that this doesn't really matter. Even +retry=100 can fail:
[...]
(and a few seconds later, it succeeded).
Maybe you are motivated much more than libc developers to find a way to
better handle your specific case. To consider improvements in caching
strategy you need to document patterns of failures you see: query
timings, likelihood of errors, intervals to get result after failed
queries. Perhaps it is impossible to implement a cache strategy that is
better in *all* scenarios.
Have you find any discussion of nscd design? Was it created purely to
reduce latency assuming reliable sources or developers had in mind some
specific cases of DNS queries failures?
Another question is whether it is reasonable to invest efforts into
suppressing AAAA queries completely at the libc level when IPv6 is disabled.