mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #314] failure to parse a valid zone file #440
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#440
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 @little-dude on GitHub (Dec 14, 2017).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/314
I'm taking a look at deckard as suggested in https://github.com/bluejekyll/trust-dns/issues/219, and the server tests are failing because trust-dns fails to parse this zone file:
There are two issues:
6h,2wor1d.IN@bluejekyll commented on GitHub (Dec 15, 2017):
This one surprises me, because I know I added support for it, we should add a test case for that specifically:
https://github.com/bluejekyll/trust-dns/blob/master/client/src/serialize/txt/master.rs#L385-L423
Edit: after reviewing the code, I realize what the problem is, it's specifically in the SOA record that this support wasn't added, we need call back the method I linked above:
https://github.com/bluejekyll/trust-dns/blob/master/client/src/serialize/txt/rdata_parsers/soa.rs#L46-L72
We can default to IN, I don't have a problem with that. It's been a while since I looked at this code, but I think the default is set to the last Record seen, so it should be as simple as setting this to
Some(DNSClass::IN)instead ofNone:https://github.com/bluejekyll/trust-dns/blob/master/client/src/serialize/txt/master.rs#L150
@davepacheco commented on GitHub (Mar 2, 2022):
In case it's helpful to anyone else, the error message I saw was:
This issue helped me find the problem (using times like "1h" in the SOA record) and work around it. Thanks!
@bluejekyll commented on GitHub (Mar 3, 2022):
Which version of trust-dns did you experience this with @davepacheco?
@davepacheco commented on GitHub (Mar 3, 2022):
I cloned the default branch and built it yesterday. I was on commit
8515a4321f.@bluejekyll commented on GitHub (Mar 3, 2022):
And was the lack of
INon the records the issue that triggered this for you?@bluejekyll commented on GitHub (Mar 3, 2022):
i.e. if we use the above config as a reference, would that cover your use case as well?
@davepacheco commented on GitHub (Mar 3, 2022):
It appeared to be the use of human-readable times (like "1h") that did it. When I changed all of those to an integer number of seconds, it worked. When I changed any of them back, I got that error.
(edit: sorry for the ambiguity earlier -- I see there were two issues described here and I zero'd in on the one I hit, related to human-readable time strings)
@bluejekyll commented on GitHub (Mar 3, 2022):
Ok. And in the SOA record specifically it sounds like? I’ll get that fixed.
@davepacheco commented on GitHub (Mar 4, 2022):
Yup, it was in the SOA record.