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

Netcheck does not query AAAA records for the derp server #2006

Closed
flub opened this issue Feb 7, 2024 · 7 comments · Fixed by #2019
Closed

Netcheck does not query AAAA records for the derp server #2006

flub opened this issue Feb 7, 2024 · 7 comments · Fixed by #2019
Labels
bug Something isn't working c-iroh
Milestone

Comments

@flub
Copy link
Contributor

flub commented Feb 7, 2024

When resolving the derp URL netcheck seems to query only A records, even on a machine which has a full public IPv6 address.

@flub flub added bug Something isn't working c-iroh labels Feb 7, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in iroh Feb 7, 2024
@dignifiedquire
Copy link
Contributor

according to lookup_ip it should do a dual stack lookup, why do you think we do not resolve AAAA records?

@dignifiedquire
Copy link
Contributor

likely this is the current behaviour:

https://docs.rs/trust-dns-resolver/latest/trust_dns_resolver/config/enum.LookupIpStrategy.html#variant.Ipv4thenIpv6

@flub
Copy link
Contributor Author

flub commented Feb 8, 2024

according to lookup_ip it should do a dual stack lookup, why do you think we do not resolve AAAA records?

Yes, I was also surprised it didn't. But didn't dig deeper and created this issue instead. You can tell when having debug logging as the resolver library logs the full query.

likely this is the current behaviour:

https://docs.rs/trust-dns-resolver/latest/trust_dns_resolver/config/enum.LookupIpStrategy.html#variant.Ipv4thenIpv6

Good find, rather possible.

@link2xt
Copy link
Contributor

link2xt commented Feb 15, 2024

For reference, there is a discussion why #2019 is not a default strategy: hickory-dns/hickory-dns#1332 (comment)
If IPv6 lookup times out, e.g. because the network blocks AAAA requests or DNS server never responds to them, it will cause a long delay even though we already have an IPv4 address resolved.

@flub
Copy link
Contributor Author

flub commented Feb 15, 2024

Eh, good point about the lack of streaming API and this delaying the IPv4 result. This could delay netcheck further for us.

@dignifiedquire
Copy link
Contributor

ugh, that is bad, we should probably manually issue ipv4 and ipv6 queries then..

@flub flub reopened this Feb 15, 2024
@github-project-automation github-project-automation bot moved this from ✅ Done to 📋 Backlog in iroh Feb 15, 2024
dignifiedquire added a commit that referenced this issue Feb 15, 2024
This now races the resolution, with a fixed timeout on each, returning as many results as found during that time.

Ref #2006
dignifiedquire added a commit that referenced this issue Feb 15, 2024
This now races the resolution, with a fixed timeout on each, returning as many results as found during that time.

Ref #2006
github-merge-queue bot pushed a commit that referenced this issue Feb 15, 2024
This now races the resolution, with a fixed timeout on each, returning
as many results as found during that time.

Ref #2006
@flub
Copy link
Contributor Author

flub commented Feb 16, 2024

Fixed in #2026

@flub flub closed this as completed Feb 16, 2024
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in iroh Feb 16, 2024
fubuloubu pushed a commit to ApeWorX/iroh that referenced this issue Feb 21, 2024
This now races the resolution, with a fixed timeout on each, returning
as many results as found during that time.

Ref n0-computer#2006
rklaehn pushed a commit to n0-computer/iroh-blobs that referenced this issue Oct 22, 2024
This now races the resolution, with a fixed timeout on each, returning
as many results as found during that time.

Ref n0-computer/iroh#2006
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working c-iroh
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants