mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #1155] feature request: make trust_dns_proto Message::update_counts public #617
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#617
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 @Sherlock-Holo on GitHub (Jun 28, 2020).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1155
Is your feature request related to a problem? Please describe.
I am trying to use trust_dns_proto to write a dns server, instead of using
DnsRequest, I am using theMessagedirectly but it can't useset_query_countbecauseMessageonly implementsDerefand can return the&Header. IfMessagecan return a&mut Headeror implementDerefMutthis problem can be fixed.Describe the solution you'd like
Messagecan return a&mut Headeror implementDerefMutDescribe alternatives you've considered
No good idea, only can use
message.queries().len()to get the query count@fluxxu commented on GitHub (Jun 29, 2020):
This field will be updated automatically before the
Messagebeen encoded to its binary form:https://github.com/bluejekyll/trust-dns/blob/main/crates/proto/src/op/message.rs#L88
https://github.com/bluejekyll/trust-dns/blob/main/crates/proto/src/op/message.rs#L793
https://github.com/bluejekyll/trust-dns/blob/main/crates/proto/src/op/message.rs#L799
@bluejekyll commented on GitHub (Jun 29, 2020):
Exactly. I'd be a little concerned about exposing that as that the logic in this path since it is not obvious. We serialize the Message, and leave space in the buffer to go back and fill in the header. This is because of the way that we handle things like signing the message for SIG0.