After adding "use-vc options" in /etc/resolv.conf, tools such as wget / curl can no longer resolve the hostname. Dig / nslookup works. But if you change the name server to 126.96.36.199 or 188.8.131.52, everything will work.
After TCPDump with the cross matrix of wget / nslookup / myDNS / 184.108.40.206. I found it:
- wget performs IPv4 and IPv6 requests in one request; nslookup is only IPv4.
- 220.127.116.11 returns IPv4 and IPv6 responses (resolved in CNAME, not IPv6 addresses) in one response; My DNS only returns IPv4.
- A test code calling getaddrinfo works the same way as wget.
With TCP DNS, glibc continues to request both IPv4 and IPv6, if the response does not contain IPv6, it fails.
Question: Is it by design? Why?