Commit Graph
12 Commits
Author SHA1 Message Date
Ximon EighteenandGitHub 3ae459a4d6 In-place zone parser yields incorrect TTLs. (fixes #537) (#538) 2025-06-04 10:27:46 +02:00
Ximon EighteenandGitHub 3d3fe59177 Require single class zonefiles by default, and give context if possible on parsing errors. (#477)
- Extend the inplace zone parser to detect violations of the RFC 1035 section 5.2 requirement that a zonefile consist of exactly one class, enabled by default, and extend its error reporting to say what the wrong and expected classes were (and also use this contextual error support for other errors where applicable).

- Remove the default IN last class and allow the last class to be set if needed, as RFC 1035 doesn't define a default class.
2025-04-01 16:07:57 +02:00
0e854cf4da DNSSEC signing improvements and general crypto and DNSSEC restructuring (#416)
---------

Co-authored-by: arya dradjica <arya@nlnetlabs.nl>
Co-authored-by: Jannik Peters <jannik.peters@posteo.de>
Co-authored-by: Martin Hoffmann <martin@nlnetlabs.nl>
Co-authored-by: Ximon Eighteen <ximon@nlnetlabs.nl>
2025-04-01 10:04:09 +02:00
Ximon EighteenandGitHub 4667b9157e FIX: Don't error with unexpected end of entry for RFC 3597 RDATA of length zero. (#475) 2025-03-31 21:45:49 +02:00
Ximon EighteenandGitHub f111cc6316 Set the AA flag and include glue in responses. (#400)
This PR adds handling of the AA flag and additional records to zonetree
answer generation.
2024-10-03 15:28:51 +02:00
Ximon EighteenandGitHub 01fccdf942 Add XFR middleware. (#384)
Add XFR middleware and:
- Fixes a bug where the incorrect owner name was passed to the zone walker callback.
- New `ixfr-client.rs` example.
- Updated `serve-zone.rs` example demonstrating TSIG authenticated XFR and NOTIFY middlewares.
- Additional From impls for CallResult.
- Renames ZoneDiff to InMemoryZoneDiff.
- Renames ZoneDiffBuilder to InMemoryZoneDiffBuilder.
- Introduces new ZoneDiff and related traits.
- Adds AnswerContent::first().
2024-10-02 21:28:01 +02:00
Ximon EighteenandGitHub b5b411ee56 Add a queryable zone tree (#286)
This PR adds zonefile/parsed.rs, zonetree/ and related examples/, which
together enable, and show a library user how, to go from a zone file in
presentation format to an in-memory tree of zones which can be queried to
provide an answer, or walked (iterated over).

The tree also supports versioned write operations and a trait based zone
implementation allowing for the in-memory tree for a zone to instead be some
other (a)synchornous backing store (as demonstrated by the mysql-zone.rs
example).

The zonetree module is feature-gated behind the unstable-zonetree feature.
2024-04-12 10:21:21 +02:00
Ximon EighteenandGitHub eb446cba54 Permit zone file strings upto AND including 255 characters in length. (#284)
This PR fixes a bug in the inplace zone parser that rejects character string of length 255.
2024-03-21 15:54:32 +01:00
xofyargandGitHub c54c7f7874 Fix a bug in dname scanning (#240)
The PR fixes an issue in scanning absolute domain names from a zonefile.
2023-11-16 14:37:32 +01:00
Martin HoffmannandGitHub 500930e68d Fix scanning of the root name. (#210)
This PR fixes scanning (i.e., reading from presentation format) of domain
names that are just the root label. It also fixes how they are displayed:
previously they were empty, now they are displayed as a dot. It also adds a
new method Dname::fmt_with_dot that returns a placeholder type that displays
the name with a dot at the end.
2023-09-18 14:22:36 +02:00
Martin HoffmannandGitHub cd88889557 Redesign zone file parsing. (#142)
This commit completely redesigns zone file parsing. The primary change is to
convert the scanner into a trait in order to allow multiple zone parser
implementations for different sources and purposes. A number of changes had
to be made in order to make this possible.

The commit also contains an initial implementation of a scanner that modifies
data in-place and can thus returned parsed data with only a minimal amount
of additional allocations. While working, this scanner is more a
proof-of-concept at this point to ensure that the API design is sound.

This commit is based on ideas and code proposed by @not-my-profile in #106.

This commit increases the minimal supported Rust version to 1.59.0.
2022-11-07 15:11:36 +01:00
Martin Hoffmann 748a4d2dc8 Merge domain-resolv into domain::resolv. 2020-08-25 17:52:10 +02:00