Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using IPv6 nameserver does not work: "dial udp6: lookup <ip6-addr>: no such host" #155

Closed
hhoffstaette opened this issue Oct 16, 2024 · 4 comments

Comments

@hhoffstaette
Copy link

IPv6 support seems to be broken in 1.0.5:

$doggo --debug -6 www.cloudflare.com @2606:4700:4700::1111 
time=2024-10-16T21:14:18.752+02:00 level=DEBUG msg="LoadNameservers: Initial nameservers" nameservers=[2606:4700:4700::1111]
time=2024-10-16T21:14:18.753+02:00 level=DEBUG msg="Added nameserver" nameserver="{Address:[2606:4700:4700:]:1111 Type:udp}"
time=2024-10-16T21:14:18.753+02:00 level=DEBUG msg="LoadNameservers: Final nameservers" nameservers="[{Address:[2606:4700:4700:]:1111 Type:udp}]"
time=2024-10-16T21:14:18.753+02:00 level=DEBUG msg="initiating UDP resolver"
time=2024-10-16T21:14:18.753+02:00 level=DEBUG msg="Attempting to resolve" domain=www.cloudflare.com. ndots=0 nameserver=[2606:4700:4700:]:1111
time=2024-10-16T21:14:18.753+02:00 level=ERROR msg="error in lookup" error="dial udp6: lookup 2606:4700:4700:: no such host"

This happens with both a self-compiled and the prebuilt binary on Linux 6.11.4 (amd64).
My IPv6 support works otherwise.

@hhoffstaette
Copy link
Author

At first glance it seems that the address parser seems to have a problem with the compressed IPv6 form, but expanding the address does not help:

$doggo --debug -6 www.cloudflare.com @2606:4700:4700:0:0:0:0:1111
time=2024-10-16T21:19:28.286+02:00 level=DEBUG msg="LoadNameservers: Initial nameservers" nameservers=[2606:4700:4700:0:0:0:0:1111]
time=2024-10-16T21:19:28.286+02:00 level=DEBUG msg="Added nameserver" nameserver="{Address:[2606:4700:4700:0:0:0:0]:1111 Type:udp}"
time=2024-10-16T21:19:28.286+02:00 level=DEBUG msg="LoadNameservers: Final nameservers" nameservers="[{Address:[2606:4700:4700:0:0:0:0]:1111 Type:udp}]"
time=2024-10-16T21:19:28.286+02:00 level=DEBUG msg="initiating UDP resolver"
time=2024-10-16T21:19:28.286+02:00 level=DEBUG msg="Attempting to resolve" domain=www.cloudflare.com. ndots=0 nameserver=[2606:4700:4700:0:0:0:0]:1111
time=2024-10-16T21:19:28.287+02:00 level=ERROR msg="error in lookup" error="dial udp6: lookup 2606:4700:4700:0:0:0:0: no such host"

The last element is consistently cut off.

@matej-vrba
Copy link

You need to use square brackets. doggo @[2606:4700:4700::1111] example.com a aaaa

@hhoffstaette
Copy link
Author

That works - Thank You! 🚀
Is this documented somewhere? I could not find anything about this when I looked, maybe it could be added to the docs.

@matej-vrba
Copy link

matej-vrba commented Jan 18, 2025

Is this documented somewhere?

idk, but it's standard way to specify ipv6 when you need to add e.g. port (because you can't tell if 8080 is port or part of the address in https://2001:db8::1:8080/). Not sure why it's required here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants