mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #2167] IN keyword is not accepted #907
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#907
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 @eirnym on GitHub (Mar 7, 2024).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2167
Describe the bug
INkeyword beside SOA records is not accepted.Bind and Knot DNS servers accepts to use CLASS RRs in each line, many zone editors and definitions contain these keyword on each line as well, also it's possible to specify record-specific TTL (which is usually 0, so in most cases it's not worth a while to respond).
please, note that RFCs has mixed opinion on this, so I see it as an optional keywords. There's no RFC to define zone file format
nslookup, dig and many other clients would response with a full line:
zone, ttl, class RR valueTo Reproduce
Steps to reproduce the behavior:
zone can contain
INrecords will failExpected behavior
no syntax error on class and invalid syntax if invalid class has been specified
System:
Version:
Crate: hickory-dns binary
Version: git revision
da41e4adAdditional context
Add any other context about the problem here.
@djc commented on GitHub (Mar 7, 2024):
Thanks for the report! Would you be able to take a whack at fixing this?
The zone file parsing code lives here: https://github.com/hickory-dns/hickory-dns/blob/main/crates/proto/src/serialize/txt/zone.rs.
Would also be great if you can just contribute a PR that adds tests for this.
Happy to answer any questions you might have.
@eirnym commented on GitHub (Mar 7, 2024):
Thanks, I'll try
@eirnym commented on GitHub (Feb 16, 2025):
Any news on this one?
@bluejekyll commented on GitHub (Mar 2, 2025):
I'm unable to reproduce this issue. As far as I can tell our zone parsing accepts an inline TTL with an SOA, we have some tests that cover this case. Can you provide a reproducible case for this?
We have an example zone file we use which has this example,
github.com/hickory-dns/hickory-dns@cda2c38fd4/tests/test-data/test_configs/example.com.zone (L31)I've written a test to verify this, when the SOA is present in the zone file, TTL and IN are properly optional, I've tried these combinations, and they all appear to work,
both TTL and type are optional
TTL not specified
TTL and type specified
TTL without type specified
@eirnym commented on GitHub (Mar 2, 2025):
At the moment of the report, it wasn't accepted without TTL. Because of it and other problem, I've started to use Knot DNS.
I need to retest it.