Commit Graph
184 Commits
Author SHA1 Message Date
arya dradjicaandarya dradjica 57777c9b36 Get modules expanded by macros formatted
See <https://github.com/rust-lang/rustfmt/issues/6587>.
2025-06-24 12:41:42 +00:00
arya dradjicaandarya dradjica e8e40c6641 Disallow elided lifetimes in paths
This language feature is deprecated, but the lint for it is not
enabled by default.  Enabling the lint and fixing all occurrences also
resolves some new Clippy lints.  This does not affect the API or
behaviour of the code in any way.
2025-06-24 11:59:06 +00:00
arya dradjicaandGitHub 72b42a3991 Adjust for Clippy 1.87 lints (#530) 2025-05-21 10:21:56 +00:00
Philip Homburg a3756ed280 Rename Alg to Algorithm (#473) 2025-04-02 11:08:55 +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
Philip-NLnetLabsandGitHub bcb4e8553f Fix clippy errors for 1.85.0. (#490)
* Fix clippy errors for 1.85.0.

* Also fix nightly clippies.

* Restore comment.

* Remove redundant ok()
2025-02-26 15:21:59 +01:00
arya dradjicaandGitHub 54886e047b Change the MSRV policy and bump to 1.79.0 (#480)
The MSRV is being bumped so that `domain` can access newer language features.  In particular:

- `<[u8]>::utf8_chunks()` (1.79) is very useful for processing byte strings that will _mostly_ contain valid UTF-8 text.
- `core::net` (1.77) allows us to remove our polyfills of `Ipv4Addr` etc., used when the `std` feature is disabled.
- `async fn` and return-position `impl Trait` in traits (1.75) allow us to define traits using `async fn`, avoiding the overhead of `Box<dyn Future>` for un-nameable future types.
- `Option::is_some_and()` (1.70) simplifies a very common pattern when inspecting optional values.

The MSRV bump policy is also being updated; it sets a maximum MSRV (relative to the latest stable Rust version) and documents the conditions under which a bump will occur.
2025-01-22 11:22:02 +01:00
Philip Homburg f5deabdf9f Fix clippy::question_mark issues. 2025-01-13 16:24:54 +01:00
Ximon EighteenandGitHub 245f2cfcba Add a tab before the RDATA as well as within it, to match LDNS tabbed output format. (#463) 2024-12-06 14:22:03 +01:00
Terts DiepraamandGitHub 92ed95184b Add TabbedWriter for ZonefileFmt (#446)
* add AlignedWriter for ZonefileFmt

* Rename AlignedWriter to TabbedWriter
2024-12-05 13:03:09 +01:00
93a0053596 Apply fixes for new issues found by Clippy 1.83.0 (#460)
Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
2024-11-29 15:33:18 +01:00
Ximon EighteenandGitHub 6b842a7d10 Derive Arbitrary for some types via a new Cargo feature, to enable fuzz testing in downstream projects that use those types. (#441) 2024-11-14 15:11:56 +01:00
WeilenceandGitHub 196c5f5fe1 Add support for NAPTR record type (#427) 2024-11-04 09:54:21 +01:00
Terts DiepraamandGitHub 9a9624150d Internal message printer exposed as display_dig_style (#420)
* Internal message printer exposed as display_dig_style

* fix clippy lint

* rename MessagePrinter to DigPrinter and use if-let

* document display_dig_style and ZonefileFmt
2024-10-31 12:28:37 +01:00
ed9824894d Restore 'Display' behaviour for 'SecAlg' etc (#428)
* Restore 'Display' behaviour for 'SecAlg' etc

The doc comment for 'int_enum_str_decimal' explicitly states that the
'FromStr' impl expects a decimal number and that the 'Display' impl
will also output a decimal number.  However, 'Display' was also adding
the mnemonic for the number.

* Print mnemonics for SecAlg etc. in ZonefileFmt comments

---------

Co-authored-by: arya dradjica <arya@nlnetlabs.nl>
2024-10-29 13:26:15 +01:00
Weilence 471eb72bdf HINFO display CPU and OS using quoted format 2024-10-27 22:49:08 +08:00
Terts DiepraamandGitHub dee14bdb30 Merge pull request #379 from NLnetLabs/ds-print-secalg-as-int
Add `ZonefileFmt` trait for printing records as zonefiles
2024-10-23 12:17:54 +02:00
Terts Diepraam 9b63eda167 Remove dyn object from SimpleWriter and MultilineWriter 2024-10-23 11:39:36 +02:00
Terts Diepraam bbb002edf6 change manual write call to write! macro 2024-10-22 10:53:03 +02:00
arya dradjicaandGitHub 97c0036110 Introduce HashCompressor for name compression (#396)
This PR adds a new name compressor that uses a hash map rather than a
tree.
2024-10-21 15:33:02 +02:00
Terts Diepraam 4f5084f548 fix rustfmt again 2024-10-16 16:22:33 +02:00
Terts Diepraam c30ad83942 fix rustfmt 2024-10-16 16:20:09 +02:00
Terts Diepraam baec4e630d Merge branch 'main' into ds-print-secalg-as-int 2024-10-16 16:16:56 +02:00
Martin Hoffmann 42f728f598 Fix doctest without std. 2024-10-14 16:20:27 +02:00
Martin HoffmannandGitHub 6b5de84b9a Fix serde impls to work with nostd. (#413)
This PR fixes issues that block building the "serde" feature without "std".

Specifically:

* Change the Serialize impls of ParsedName and ExtendedError to not build
  strings first.
* Added a Deserialize impl to base::net:nostd::Ipv6Addr and fixed the impl
  for Ipv4Addr.
2024-10-14 15:35:41 +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
mworsley-cloudflareandGitHub 7ba4b710c0 Add NXNAME RR type and invalid query type EDE (#392) 2024-10-02 11:45:43 +02:00
Terts Diepraam 1f9e77d6e8 rename ZonefileFmt::show to fmt 2024-09-30 10:47:50 +02:00
Terts Diepraam a2d02bdd20 small stylistic improvements 2024-09-27 16:28:49 +02:00
Terts Diepraam 930dde2239 improve and document pretty TTL format 2024-09-27 16:28:24 +02:00
Terts Diepraam 52e2490207 do not use return type impl trait for ZonefileFmt 2024-09-27 14:57:30 +02:00
Terts Diepraam a81e1bb239 Merge branch 'main' into ds-print-secalg-as-int 2024-09-27 14:24:35 +02:00
Terts Diepraam 48da4000c2 rename Show to ZonefileFmt 2024-09-27 14:01:48 +02:00
Ximon EighteenandGitHub e47b22613a Add RR batching functionality. (#383) 2024-09-25 15:07:42 +02:00
Ximon EighteenandGitHub e08bfe7eee Fix cargo doc broken link warnings. (#395) 2024-09-20 12:42:08 +02:00
Terts DiepraamandGitHub c8641758a1 Fix clippy warnings from Rust 1.81 (#385) 2024-09-09 11:28:47 +02:00
Terts Diepraam 6b2a677c8c remove some uses of std 2024-09-06 14:59:54 +02:00
Terts Diepraam 62b1fbcb51 implement fmt_with_dot on ToName 2024-09-06 14:55:41 +02:00
Terts Diepraam 3fe89113c5 add more info to show impls 2024-09-06 14:01:18 +02:00
Terts Diepraam ac0fca87dd write some tests for Show 2024-09-04 15:05:29 +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
Terts Diepraam d9eade978f Merge branch 'main' into ds-print-secalg-as-int 2024-09-04 13:29:41 +02:00
Terts Diepraam 955d129b2c show instead of present 2024-09-04 13:28:32 +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
Terts Diepraam fb2d57352b clean some things up 2024-09-02 15:42:11 +02:00
Terts Diepraam fceb571134 print owner with dot in Present 2024-08-30 16:47:54 +02:00
Terts Diepraam a4efde7db5 add Present trait for printing Records as zonefile 2024-08-30 16:31:48 +02:00
Ximon EighteenandGitHub 733beb4a15 Fix start_answer() doc string. (#347)
Saying that `start_answer()` "adds what it can" implies that on error what
was added is preserved. That is however not true.
2024-08-14 12:31:08 +02:00
Ximon EighteenandGitHub ecb4507a5e Allow glue (e.g. A/AAAA) at zone cut. (#363)
Also add a Rtype::is_glue() helper fn and check for the inverse case of our previous fix as well, namely adding a zone cut where glue pre-exists.
2024-07-24 18:29:13 +02:00
Ximon EighteenandGitHub d6c6d0b2f8 Add OptRcode::is_ext() to test if an Rcode is extended per RFC 6891. (#358) 2024-07-23 10:55:41 +02:00