mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-24 18:55:55 +03:00
[GH-ISSUE #745] Return an error instead of silently discarding non-parsable EDNS Options #286
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#286
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 @jonasbb on GitHub (Apr 9, 2019).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/745
Describe the bug
If parsing EDNS Option records fails in the code no error is returned. Instead you receive an empty list of options. The log message in the error path is not visible enough.
To Reproduce
Parse a record which triggers the codepath below, like the example in https://github.com/bluejekyll/trust-dns/pull/744
Expected behavior
I would expect the parsing to fail and return an error. Silently discarding the parsing error and returning an empty result is very confusing.
System:
Version:
Crate: trust-dns-proto
Version: 0.7.1
Additional context
This is the problematic code. Instead of just logging the warning, I think it should return an error such that parsing fails.
github.com/bluejekyll/trust-dns@43632d54fd/crates/proto/src/rr/rdata/opt.rs (L251-L256)@bluejekyll commented on GitHub (Apr 9, 2019):
Hm, I can't remember why I wouldn't have returned an error in this case. I agree that it seems like it should return an error.