mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[GH-ISSUE #2679] EDNS0 flags should not interpret Z field #1042
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#1042
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 @dead10ck on GitHub (Dec 15, 2024).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2679
In #2549, a special type was added for encoding the EDNS flags. It added a field for the DO flag and one for a Z flag.
At first glance in RFC 6891, I can see how this was interpreted the way it was, since it seems to list
DOandZas separate flags.However, two other RFCs that it references seem to suggest that
Zis not a flag in and of itself, but rather refers to the whole two bytes as a collective field, in whichDOis the first bit.https://www.rfc-editor.org/rfc/rfc3225#section-3
And further, the RFC that precedes this one seems to further support this, by showing the whole 2 bytes without the DO bit present.
https://www.rfc-editor.org/rfc/rfc2671#section-4.6
Semantically, it seems to just be unused bits that are expected to be zeroed. I don't think it makes much sense to interpret them as having any meaning at all. In my opinion, it should just be left out of the parsed structure.
@bluejekyll commented on GitHub (Dec 16, 2024):
Is there a reason that we wouldn’t want to expose this? One problem I see is that if anyone needs to integrate with a system that uses the Z bits for anything, it is possible with the current layout, but wouldn’t be in the future. That is, this is somewhat future proof, and is really only directly accessible if using Message at a low level, otherwise the server, recursor, and resolver all manage EDNS settings directly.
@djc commented on GitHub (Dec 16, 2024):
Do you have any underlying concerns?
Like @bluejekyll I don't see a problem with exposing this. I'm also inclined to think that RFC 6891 (which was published 12 / 14 years after 3225 / 2671) benefits from a bunch of additional experience, so I'd prefer to trust it instead of the much older RFCs.
@dead10ck commented on GitHub (Dec 16, 2024):
Exposing them for future use does indeed make sense, but the flags were changed to an opaque boolean, so that wouldn't even be possible. If we want to expose the raw bytes for future use, then it should be raw binary. As it stands, the way Z is exposed is both meaningless in the present and useless in the future.
@djc commented on GitHub (Dec 18, 2024):
Fair enough, I've submitted a fix in https://github.com/hickory-dns/hickory-dns/pull/2684.
@dead10ck commented on GitHub (Dec 19, 2024):
Thanks for taking the feedback, and the fix! And for all the work you do to maintain this lib. You folks are awesome. ♥️