mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #1980] srv lookup docs seem wrong about looking up IPs #837
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#837
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @davepacheco on GitHub (Jun 27, 2023).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1980
Describe the bug
The docs for
SrvLookup::ip_iter()say:I assumed this means to say "if they were not included in the initial response"? I interpreted this note to mean that Trust-DNS takes each of the SRV records returned from this query, looks at the target, and makes another query for the A/AAAA records for that target. I know many DNS servers include these A/AAAA records as additional records in the response to the SRV query, and I assume Trust-DNS uses those if it can rather than making a second query. But I assumed from this text that if the server didn't include those A/AAAA records in the response, then Trust-DNS would query for each target on its own.
That doesn't seem to be the case. I've got a DNS server that returns these responses:
When I use
AsyncResolver::srv_lookup()to look up_cockroach._tcp.control-plane.oxide.internal, the iterator returned bySrvLookup::ip_iter()is empty. I can see from the DNS server log that the server got a query for_cockroach._tcp.control-plane.oxide.internal, but got no queries for the other names. Am I misunderstanding this note?To Reproduce
I expect you can reproduce this by standing up a DNS server that returns results like the above, using
AsyncResolver::srv_lookup()to look up the SRV name, and then looking at the results of theip_iter(). I could write a small program to try to reproduce this.Expected behavior
Based on the docs, I expected to get back the set of IP addresses referenced by the AAAA records associated with the targets of the SRV records. That'd be
ff::1,ff::2, andff::3in this case.I think it's reasonable for Trust-DNS not to do this, but then the docs seem confusing.
System:
Version:
Crate: resolver
Version: 0.22
@bluejekyll commented on GitHub (Jun 27, 2023):
It looks like you might have run into this issue that's documented as a FIXME in the caching_client,
github.com/bluejekyll/trust-dns@c4e92cf837/crates/resolver/src/caching_client.rs (L325-L329)