Commit Graph
1019 Commits
Author SHA1 Message Date
Ximon EighteenandGitHub 930786ed2e FIX: Servers should drop received DNS response messages, not propagate them for processing. (#381) 2024-10-03 13:34:55 +02:00
Ximon Eighteen 1c7be5d8d0 Minor corrections in code comments. 2024-10-03 13:31:46 +02:00
Martin Hoffmann 197fe0c9a4 Update changelog. 2024-10-03 12:47:16 +02:00
Martin Hoffmann 52a19441ee Update changelog. 2024-10-03 12:35:27 +02:00
Ximon EighteenandGitHub 41d72b33e6 Usability tweaks (#397)
This PR adds a few trait impls and documentation.

Specifically:

* Add blanket `SendRequest` and `SendRequestMulti` impls for boxes.
* Add `Display` impl to `tsig::Key`.
* Add an `as_any` method and `Clone` and `Debug` impls to various zonetree
  types.
* Add `AsRef<dyn ZoneStore>` to `Zone`.
2024-10-03 12:33:58 +02:00
3b7ccb7197 Link to definition of DNS (#386)
* Link to definition of DNS
* Also spell out DNS.

---------

Co-authored-by: Martin Hoffmann <martin@nlnetlabs.nl>
2024-10-03 12:19:32 +02:00
Ximon Eighteen 3227bd185c Typo correction in RustDoc comment. 2024-10-03 10:25:15 +02:00
Ximon Eighteen 3ab7d5fd68 Update changelog. 2024-10-02 21:56:07 +02:00
Ximon EighteenandGitHub a35412186b Extend MandatoryMiddlewareSvc with an RFC 9619 check for opcode QUERY with QDCOUNT > 1. (#365) 2024-10-02 21:54:21 +02:00
Ximon Eighteen 38cbb13a20 Update changelog. 2024-10-02 21:35:38 +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 Eighteen c87c6d50a8 Update changelog. 2024-10-02 21:05:32 +02:00
Ximon EighteenandGitHub 56aa3e35b0 Fix zone walking to include non-leaf CNAMEs (#352)
Add code to emit the non-leaf CNAMEs to the zone walker callback operation.
2024-10-02 21:04:23 +02:00
Ximon Eighteen bc69bc205c Update changelog. 2024-10-02 20:58:34 +02:00
Ximon EighteenandGitHub 279fc79f1c Enforce dgram max response size limit. (#398) 2024-10-02 20:57:18 +02:00
Ximon EighteenandGitHub 5b50a22b24 Make TSIG interop tests run as Rust integration tests. (#364) 2024-10-02 18:16:31 +02:00
Martin Hoffmann 471573b215 Update changelog. 2024-10-02 18:08:30 +02:00
Terts DiepraamandGitHub 58e6e6e4f3 Add serde::Serialize for AllRecordData. (#343)
This PR adds a `Serialize` impl to `AllRecordData` and as a consequence to
the OPT record and all OPT options, as well as `ParsedName`.
2024-10-02 18:07:26 +02:00
Martin Hoffmann 0f28f0c1fc Update changelog. 2024-10-02 17:48:21 +02:00
Terts DiepraamandGitHub 837bf9762d Ensure TSIG is the last record (#334)
This PR fixes the tsig module to reject messages with multiple TSIG records.
2024-10-02 17:46:00 +02:00
Ximon Eighteen 968351307e Update changelog. 2024-10-02 11:48:39 +02:00
mworsley-cloudflareandGitHub 7ba4b710c0 Add NXNAME RR type and invalid query type EDE (#392) 2024-10-02 11:45:43 +02:00
Ximon Eighteen 378cbd8fd5 Update changelog. 2024-09-25 21:33:19 +02:00
Ximon Eighteen 160d947ccb Update changelog. 2024-09-25 21:31:36 +02:00
Ximon EighteenandGitHub e47b22613a Add RR batching functionality. (#383) 2024-09-25 15:07:42 +02:00
Ximon Eighteen 5949dcd0e5 Update changelog. 2024-09-25 09:30:55 +02:00
Ximon EighteenandGitHub 915388ce24 Add RFC 1996 NOTIFY support. (#382)
Add RFC 1996 "slave" side minimalistic NOTIFY request support, delegating the actual work to a caller supplied helper that implements a new Notifiable trait.
2024-09-24 20:43:53 +02:00
Ximon Eighteen 0fd36fdf45 Update changelog. 2024-09-23 22:54:17 +02:00
Ximon EighteenandGitHub 2f61942c47 XFR zone updating. (#376)
Major changes:
- Add ZoneUpdater, ZoneDiffBuilder and ZoneDiff types.

Other changes:
- ZoneUpdate:
  - Renamed the inner record type of ZoneUpdate from XfrRecord to ParsedRecord as it is not XFR specific.
  - Added variant ZoneUpdate::DeleteAllRecords which is now emitted at the start of an AXFR update by XfrZoneUpdateIterator.
  - Removed the superfluous serial number data members associated with some ZoneUpdate variants.

- zonetree::in_memory:
  - Factor out ZoneApex::prepare_name() as zonetree::util::rel_name_rev_iter() as it is also now used by ZoneUpdater.
  - Improve some naming, e.g. there was mix of terms remove and clean, all references to clean have now been renamed to remove based names instead.
  - Altered the logic in Versioned::remove_all() (formerly Versioned::clean()) as it made destructive changes to the zone that would have impacted readers of the current zone version while the new zone version was being created.
  - Adds an arc_into_inner() function for Rust <1.70.0 which doesn't have Arc::into_inner().

- Additional trait bounds where needed.

- Removed some unused code.
2024-09-23 22:42:48 +02:00
Ximon EighteenandGitHub e08bfe7eee Fix cargo doc broken link warnings. (#395) 2024-09-20 12:42:08 +02:00
Ximon Eighteen 60f25705ed Typo correction. 2024-09-17 15:56:31 +02:00
Ximon Eighteen 604780e932 Update changelog. 2024-09-17 15:33:33 +02:00
Ximon EighteenandGitHub 2c700853d5 XFR response interpreter. (#375) 2024-09-17 15:24:08 +02:00
400843e226 Add TSIG middleware. (#380)
- Add TSIG response signing middleware.
- Update Stelline server integration tests to use the new TSIG middleware.
- Add TSIG Stelline test recipe.
- TSIG module changes:
  - Derive Clone for Key.
  - Added Key::compose_len() for determining how many response bytes to reserve.
  - Added ClientTransaction::wrapped_key(), ClientSequence::wrapped_key() and SigningContext::wrapped_key() to access the real underlying "wrapped" key type.
  - Added From<ServerTransaction<K>> for ServerSequence<K>.
  - Various minor RustDoc improvements.
 - Make Time48 obey mock (predictable and controllable) time so that TSIG signing uses mock time during Stelline tests.

Other:
- Remove unnecessary Unpin bounds on net::server::message::Request.
- Remove unnecessary Clone bound on impl SendRequest for net::client::dgram::Connection.
- Remove unnecessary mutex lock on middleware post-processing response state and rename PostprocessingConfig to PostprocessingState to better reflect its mutable nature.
- Don't set the AA flag on test service responses as (a) actual zone serving doesn't do this yet and this still needs fixing, and (b) it violates the expectations of the TSIG Stelline test that verifies at a byte level the TSIG response signature.

---------

Co-authored-by: Philip Homburg <philip@nlnetlabs.nl>
Co-authored-by: Philip-NLnetLabs <93709748+Philip-NLnetLabs@users.noreply.github.com>
Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
2024-09-16 16:25:29 +02:00
Ximon EighteenandGitHub 1d022f4283 Revert regression of changes in 0.9.3 that switched from the futures crate to futures-util instead. (#389) 2024-09-13 14:02:57 +02:00
Ximon EighteenandGitHub 874cc6f493 Typo corrections in RustDoc comments. 2024-09-12 21:40:59 +02:00
Ximon EighteenandGitHub 6a89f84838 Typo correction in RustDoc comment. 2024-09-12 21:38:54 +02:00
Ximon EighteenandGitHub 3356931057 Replace missed TODO RustDoc with actual content. 2024-09-11 18:16:38 +02:00
Ximon EighteenandGitHub c254a63f7c Update changelog. 2024-09-11 17:41:33 +02:00
Ximon EighteenandGitHub 12f1ebfea0 Typo correction. 2024-09-11 17:27:30 +02:00
Ximon EighteenandGitHub 6dd30e1f87 Update changelog. 2024-09-11 16:35:44 +02:00
Ximon EighteenandGitHub 282f94b327 Add a TSIG client. (#373) 2024-09-11 16:32:38 +02:00
Ximon EighteenandGitHub d5d8f610d9 We implement RFC 8945, so replace link to RFC 2845. 2024-09-11 10:28:08 +02:00
Ximon EighteenandGitHub f3248b371d Stelline server testing changes for XFR and TSIG support. (#372)
- Added a simple UDP client that doesn't interfere with requests before sending (for TSIG testing).
- Added support for receiving multiple responses (for XFR testing).
- Added support for connection timeout errors
- Added support for connection termination errors (for EDNS testing).
- Added support for specifying the TSIG key to use (for TSIG testing).
- Added support for $ORIGIN in zone file fragments.
- Simplified rcode checking and use it instead of the yxrrset BADCOOKIE hack.
- In memory channel changes:
  - Fixed a trace message that incorrectly referred to client instead of server.
  - Fixed a too-tight connection read loop that was preventing Tokio task switching.
  - Added connection shutdown detection.
- Fixed incorrect setting of TCP mode to true when UDP mode was requested.
2024-09-09 20:22:55 +02:00
Terts DiepraamandGitHub c8641758a1 Fix clippy warnings from Rust 1.81 (#385) 2024-09-09 11:28:47 +02:00
Philip Homburg 93ef4d1480 Update Changelog for #377 2024-09-04 14:06:30 +02:00
Philip Homburg 90cc96d632 Add support to client transports for requests that may result in multiple
responses. (#377)

This adds ComposeRequestMulti and other *Multi types. The main change is to
the stream transport, which is the only transport that implements
SendRequestMulti.
2024-09-04 14:03:12 +02:00
Ximon EighteenandGitHub 851d261d31 Update changelog. 2024-09-03 16:27:20 +02:00
Ximon EighteenandGitHub ce74445279 Service enhancement prerequisites for XFR support (#369)
* Adds support for indicating to downstream Service impls that a certain number of bytes should be reserved (to make space for adding a TSIG RR or EDNS options during middleware post-processing).

* Adds support for strongly typed passing of arbitrary metadata between middleware that produces a type and middleware that consumes the type (e.g. passing the used TSIG key name from TSIG middleware to XFR middleware).

* Replaces the blanket impl Service for Arc with a more general impl Service for Deref.

* Removes the blanket impl Service for fn as I have multiple times been blocked from defining some other Service impl because the fn one matches, because its presence can cause very confusing compiler error messages if your impl Service for T is not quite in sync with the signature of your other impl T blocks.

* Adds an "enabled" flag to the CookiesMiddlewareSvc making it easier to create a service stack with optionally enabled layers based on runtime configuration.
2024-09-03 15:39:52 +02:00
Martin Hoffmann ed6110517e Update changelog. 2024-08-20 14:17:39 +02:00