ogham / dog

A command-line DNS client.
https://dns.lookup.dog/
European Union Public License 1.2
5.95k stars 164 forks source link

Queries for AAAA records return A records #91

Open pocc opened 2 years ago

pocc commented 2 years ago

Problem

Querying for AAAA records returns A results

Expected

A dig to google should return this IPv6 address:

$ dig aaaa google.com +short
2607:f8b0:4005:80f::200e

Actual

But it doesn't:

dog aaaa google.com
Status: NXDomain
SOA             1h10m29s A "a.root-servers.net." "nstld.verisign-grs.com." 2021120500 30m00s 15m00s 7d0h00m00s 1d0h00m00s
  A google.com.    1m04s   142.250.191.46

Weirdly, it shows the A record instead, which is not what I asked for.

Version info

Macos 12.0.1 Installed dog with brew

dog --version
dog ● command-line DNS client
v0.1.0
https://dns.lookup.dog/
elsaco commented 2 years ago

@pocc try with AAAA instead lower cases:

[tux@fedora ~]$ dog AAAA google.com
AAAA google.com. 1m24s   2607:f8b0:400a:806::200e

On Linux it returns server failure when using aaaa:

[tux@fedora ~]$ dog aaaa google.com
Status: Server Failure
A google.com. 4m15s   142.250.217.110
pocc commented 2 years ago

This utility shouldn't be case-sensitive with records. The linux example seems to be a separate issue.

elsaco commented 2 years ago

FWIW after building the latest pre-release ( main 721440b ) lowercase options work also:

[~]$ dog aaaa www.cloudflare.com
AAAA www.cloudflare.com. 4m41s   2606:4700::6810:7c60
AAAA www.cloudflare.com. 4m41s   2606:4700::6810:7b60