i.e. do not make query for IPv6 addresses, when running on non-IPv6 kernel,
or, do not query for IPv4 address on IPv6-only kernel :-)
This kind of behavior is not very well documented in RFC2553. This
may violate the spec.
- on EAI_AGAIN, only retry 3 times (3 is a magic number). Previous code
made retries forever. This solves situation where name server is wrongly
configured and nameserver:53 returns icmp port unreach.
The only proper fix for all getaddrinfo() related twists would be to
implement getipnodebyname() and get rid of wacky get_addr().
We need to contribute bind8 development for this.