Hi,
Since my first mail didn't seem to reach the list - it can't be found in the
list archive - I'm resending it. I'm sorry if you got it twice.
As I understand the source ares_gethostbyname together with AF_INET6 falls back
to AF_INET if no IPv6 address can be found (at least if a DNS server is
queried). But this does not seem to be true for hosts in /etc/hosts. For example
localhost fails to resolve with ares_gethostname together with AF_INET6.
As some programs depend on this fallback behavior (znc for example) it would be
nice to have the same for hosts defined in /etc/hosts. A possible fix would be
to do the following in next_lookup: if file_lookup fails with AF_INET6 retry
with AF_INET.
Kind regards,
-- Sebastian Ramacher