mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #735] Perform additional processing for NAPTR #285
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#285
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 @bluejekyll on GitHub (Apr 7, 2019).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/735
Is your feature request related to a problem? Please describe.
NAPTR records include a reference to a “replacement” name, this should be included in the additional section. This can point to SRV or A/AAAA.
Describe the solution you'd like
In the
resolverwe may want to process NAPTR and perform additional lookups, but this is zone dependent, so the resolver doing this properly might be wasteful on the query.The
servercan do this efficiently, as it has access to the zone, it can return known records on the chain.@nhoyle commented on GitHub (Apr 7, 2019):
If I remember my RFCs correctly (I'm not looking at them right now), "Additional" record responses are only supposed to be returned when the server already has knowledge of the additional records (making the additional information effectively "zero cost" to provide). This means either the server is authoritative for the zone in question, or the server has recently queried the additional records in question, and still has them in an unexpired cache from that prior lookup.
In the situation where the queried server is authoritative for all records involved, the NAPTR query will likely result in SRV RRs as the response, which in turn could be resolved to A/AAAA records. (Alternately, the NAPTR results could be A/AAAA records, directly.) This would mean that the server could provide an "answer" section to the NAPTR query with the direct results, as well as "additional" SRV and A/AAAA records, at no additional query cost/latency.
If the server is acting (in whole, or in part) as a recursive resolver on behalf of the client, and is not authoritative for one or more of the queried zones in the NAPTR->SRV->A/AAAA chain, then it would be a violation of the RFCs for the server to launch additional queries on behalf of the client to return any information not already cached from prior lookups. (Although, potentially all of that information could be cached, and valid to return.)
That said, in the typical use case of a SIP client attempting to initiate a connection, all of the above components would need to be resolved before the client could achieve any real forward progress. (For example, you can't connect a VoIP phone call without knowing the IP of the next-hop server/user-agent.) It is obviously less efficient, both from a server resource and client latency perspective, to force the client to launch three queries when the server could potentially launch the second and third queries on behalf of the client (for the SRV and A/AAAA records) without the need to round-trip back to the client with the partial results.
Because doing so would violate RFCs however, such behavior should be an optional feature to be enabled, either via resolver/server config, or as part of the request protocol between the client and resolver/server, to indicate this behavior is desired.
In practice, a large number of NAPTR records (which may likely correspond to individual telephone numbers) may fan in to a comparatively small number of server farms and IPs (SRV and A/AAAA records). As such, it is likely that good caching performance may be observed without deviating from the RFC-specified query behavior, so long as the TTLs associated with the SRV and A resource records is not unreasonably short.
As such, I would consider it a priority to support providing "additional" RR information for the SRV and A/AAAA information when available either via virtue of being the zone authority, or via cache, and consider launching additional queries on behalf of the client a possible future extension if experience suggests it is necessary.
(Hopefully the above is not overkill, was trying to provide clarity. If it's still not clear, I can try to muddy the waters further.)
@bluejekyll commented on GitHub (Apr 8, 2019):
Yes, this all sounds accurate to what I would think is the case.