Commit Graph
931 Commits
Author SHA1 Message Date
Martin HoffmannandGitHub baea42e5e7 Add a first version of the contribution guidelines. (#332) 2024-06-10 16:52:34 +02:00
Terts DiepraamandGitHub d5b688b0d5 Removed unnecessary clippy allows and rustfmt suggestions (#331) 2024-06-10 14:11:22 +02:00
Martin Hoffmann f1e6062019 Update changelog. 2024-06-03 17:03:01 +02:00
Martin HoffmannandGitHub b65cc98d7f Release 0.10.1. (#326)
New

* Allow AllRecordData’s parsing impls to accept an unsized [u8] as the
  source octets. ([#310] by [@xofyarg])
* Made `sign::records::FamilyName` public. ([#312] by [@achow101])
* Added an impl of `FromStr` for `Question`. ([#317])

Bug fixes

* Accept an empty record type bitmap when scanning NSEC/NSEC3 data.
  ([#310] by [@xofyarg])
* Fix serialization of ProtoRrsig to conform with RFC 4034. ([#313 by
  [@achow101])
* Add `?Sized` bounds to `Message::is_answer` and `ParsedRecord::to_record`.
  ([#318] by [@xofyarg], [#325] by [@hunts])
* Bring back `MessageBuilder::as_target`. ([#318] by [@xofyarg])
* Bring back `impl FreezeBuilder for StaticCompressor`. ([#318] by [@xofyarg])
* `sign::records::RecordsIter::skip_before` now stops at the first name in
  zone even if the apex itself doesn’t appear. ([#314] by [@achow101])
* Fix a counting error in `SliceLabelsIter::next` that broke compression
  via `StaticCompressor`. ([#321] by [@hunts])

Unstable features

* New unstable feature `unstable-stelline` for the Stelline testing
  framework as a “normal” module of _domain._ ([#315])
* Renamed the domain name types in `zonetree` from `Dname` to `Name`.
  ([#308])

Other changes

* The minimum Rust version is now 1.78. ([#320])
v0.10.1
2024-06-03 16:59:41 +02:00
Martin Hoffmann 161339b76f Update README (a bit). 2024-06-03 16:29:51 +02:00
Martin Hoffmann 5f96282389 Update changelog. 2024-06-03 16:27:42 +02:00
Terts DiepraamandGitHub dab2a90563 Refactor pointer casts to transmutes and annotate with repr(transparent) (#324)
This PR adds #[repr(transparent)] to various wrapper types and replaces
pointer cases with mem::transmute.
2024-06-03 16:23:41 +02:00
Minghang ChenandGitHub d4f120a205 allow create real resource record from unsized data (#325)
This is another fix for missing `?Sized` bound in the 0.10.
2024-06-03 15:39:52 +02:00
Martin HoffmannandGitHub ac63ab239b Impl FromStr for Question and use it in Stelline. (#317)
This PR adds an impl of FromStr for Question<_> and uses this impl to parse
the question section in Stelline’s RPL files.
2024-06-03 15:37:27 +02:00
Terts DiepraamandGitHub c72f07eb47 Remove (direct) dependency on hex and pin-project-lite (#323)
This PR the dependencies of hex, which can be replaced by our own base16
module, and pin-project-lite whose use is unnecessary.
2024-06-03 14:09:47 +02:00
Martin Hoffmann 7c399fcb56 Update changelog. 2024-05-30 14:22:54 +02:00
Ava ChowandGitHub 42c0d4495e Don't skip children of apex in SortedRecords (#314) 2024-05-30 14:19:44 +02:00
xofyargandGitHub 57f3475b3f add some missing methods/trait bounds (#318)
This PR:
* adds a missing ?Sized bound on Message::is_answer,
* adds MessageBuilder::as_target,
* impls FreezeBuilder for StaticCompressor.
2024-05-30 13:58:13 +02:00
Minghang ChenandGitHub 7ebfcf376f Domain name compression is broken in 0.10.0 (#321)
This PR fixes a bug in SliceLabelIter’s next method that causes it to
return short labels. This fixes StaticCompressor which uses this iterator.
2024-05-30 08:45:35 +02:00
Terts DiepraamandGitHub f84abe0da8 Fix rustdoc links across the repo (#319) 2024-05-29 16:48:40 +02:00
Martin Hoffmann 55d3dd3001 Update changelog. 2024-05-29 16:33:34 +02:00
Terts DiepraamandGitHub 30b7b99030 bump to rust 1.78 (#320)
This PR updates the minimum supported Rust version to 1.78.
2024-05-29 16:32:36 +02:00
Martin Hoffmann a1b88c5021 Update changelog. 2024-05-15 11:28:28 +02:00
Philip-NLnetLabsandGitHub 5586fff39d Move Stelline from tests to src/stelline. (#315)
This PR moves Stelline to be a regular module gated by the unstable-stelline
feature.
2024-05-15 11:26:52 +02:00
Martin Hoffmann 5c7dd7387e Merge branch 'main' of github.com:NLnetLabs/domain 2024-05-10 10:53:58 +02:00
Martin Hoffmann 267fab7c6a Update changelog. 2024-05-10 10:53:43 +02:00
Ava ChowandGitHub 053dbc16df Remove incorrect compose_len from rrsig (#313)
ProtoRrsig is used to produce the data that is signed. According to
RFC 4034, this serialization begins with the first rdata field which is
type_covered, however ProtoRrsig is inserting a length at the beginning. As
such, signatures produced by SortedRecords::sign() are invalid. Fix this by
removing that length from the serialization.
2024-05-10 10:52:18 +02:00
Martin Hoffmann e302148f4f Update changelog. 2024-05-06 15:28:26 +02:00
Ximon EighteenandGitHub bbfd6ff6ec More Dname to Name renaming. (#308) 2024-05-06 15:26:00 +02:00
Martin Hoffmann 11f5f7c04c Another try vis-a-vis the mock_instant feature. 2024-05-06 14:07:10 +02:00
Martin Hoffmann 1019300147 Another try vis-a-vis the mock_instant feature. 2024-05-06 13:59:22 +02:00
Martin Hoffmann febbda7e08 Update changelog. 2024-05-06 13:52:42 +02:00
Martin Hoffmann 6d8352c8b8 Merge branch 'main' of github.com:NLnetLabs/domain 2024-05-06 13:52:07 +02:00
Martin Hoffmann 665b3cfb85 Clippy-suggested improvements. 2024-05-06 13:51:57 +02:00
Martin Hoffmann d48a15b0ed Comment out remnantts of mock_instant feature. 2024-05-06 13:47:52 +02:00
xofyargandGitHub 2a13facac4 Minor fixes for 0.10.0 (#310)
This PR contains the following fixes:

* Allow AllRecordData’s parsing impls to accept an unsized [u8] as the
  source octets.
* Accept an empty record type bitmap when scanning NSEC/NSEC3 data.
2024-05-06 13:41:18 +02:00
Ava ChowandGitHub ffcb975523 Make FamilyName::new() public (#312) 2024-05-06 13:35:40 +02:00
Martin Hoffmann c05b1404fe Bump version. 2024-04-30 12:49:28 +02:00
Martin HoffmannandGitHub 524a3108a6 Release 0.10.0. (#306)
Breaking changes

* All types and functions referring to domain names have been changed from
  using the term “dname” to just “name.” For instance, `Dname` has become
  `Name`, `ToDname` has become `ToName`, and `ToDname::to_dname` has become
  `ToName::to_name`. ([#290])
* The `ToName` and `ToRelativeName` traits have been changed to have a
  pair of methods a la `try_to_name` and `to_name` for octets builders
  with limited and unlimited buffers, reflecting the pattern used
  elsewhere. ([#285])
* The types for IANA-registered parameters in `base::iana` have been
  changed from enums to a newtypes around their underlying integer type
  and associated constants for the registered values. (This was really
  always the better way to structure this.) ([#276], [#298])
* The `Txt` record data type now rejects empty record data as invalid. As
  a consequence `TxtBuilder` converts an empty builder into TXT record
  data consisting of one empty character string which requires
  `TxtBuilder::finish` to be able to return an error. ([#267])
* `Txt` record data serialization has been redesigned. It now serialized as
  a sequence of character strings. It also deserializes from such a sequence.
  If supported by the format, it alternatively deserializes from a string that
  is broken up into 255 octet chunks if necessary. ([#268])
* The text formatting for `CharStr` has been redesigned. The `Display`
  impl now uses a modified version of the representation format that
  doesn’t escape white space but also doesn’t enclose the string in
  quotes. Methods for explicitly formatting in quoted and unquoted
  presentation format are provided. ([#270])
* The `validate::RrsigExt` trait now accepts anything that impls
  `AsRef<Record<..>>` to allow the use of smart pointers. ([#288] by
  [@hunts])
* The stub resolver now uses the new client transports. This doesn’t change
  how it is used but does change how it queries the configured servers.
  ([#215])
* The sub resolver’s server configuration `Transport` type has been
  changed to be either `Transport::UdpTcp` for trying UDP and if that
  leads to a truncated answer try TCP and `Transport::Tcp` for only trying
  TCP. The stub resolver uses these accordingly now ([#296])
* Many error types have been changed from enums to structs that hide
  internal error details. Enums have been kept for errors where
  distinguishing variants might be meaningful for dealing with the error.
  ([#277])
* Renamed `Dnskey::is_zsk` to `is_zone_key`. ([#292])
* Split RRSIG timestamp handling from `Serial` into a new type
  `rdata::dnssec::Timestamp`. ([#294])
* Upgraded `octseq` to 0.5. ([#257])
* The minimum Rust version is now 1.70. ([#304])

New

* Add impls for `AsRef<RelativeDname<[u8]>>` and `Borrow<RelativeDname<[u8]>>`
  to `RelativeDname<_>`. ([#251] by [@torin-carey])
* Added `name::Chain::fmt_with_dots` to format an absolute chained name
  with a final dot. ([#253])
* Added a new `ParseAnyRecordData` trait for record data types that can
  parse any type of record data. ([#256])
* Added implementations of `OctetsFrom` and `Debug` to `AllOptData` and
  the specific options types that didn’t have them yet. ([#257])
* Added missing ordering impls to `ZoneRecordData`, `AllRecordData`,
  `Opt`, and `SvcbRdata`. ([#293])
* Added `Name::reverse_from_addr` that creates a domain name for the
  reverse lookup of an IP address. ([#289])
* Added `OptBuilder::clone_from` to replace the OPT record with the
  content of another OPT record. ([#299])
* Added `Message::for_slice_ref` that returns a `Message<&[u8]>`. ([#300])

Bug fixes

* Fixed the display implementation of `name::Chain<_, _>`. ([#253])
* Fixed the display implementation of `rdata::Txt<..>`. It now displays
  each embedded character string separately in quoted form. ([#259])
* Fixed the extended part returned by `OptRcode::to_parts` (it was shifted
  by 4 bits too many) and return all 12 bits for the `Int` variant in
  `OptRcode::to_int`. ([#258])
* Fixed a bug in the `inplace` zonefile parser that made it reject
  character string of length 255. ([#284])

Unstable features

* Added the module `net::client` with experimental support for client
  message transport, i.e., sending of requests and receiving responses
  as well as caching of responses.
  This is gated by the `unstable-client-transport` feature. ([#215],[#275])
* Added the module `net::server` with experimental support for server
  transports, processing requests through a middleware chain and a service
  trait.
  This is gated by the `unstable-server-transport` feature. ([#274])
* Added the module `zonetree` providing basic traits representing a
  collection of zones and their data. The `zonetree::in_memory` module 
  provides an in-memory implementation. The `zonetree::parsed` module
  provides a way to classify RRsets before inserting them into a tree.
  This is gated by the `unstable-zonetree` feature. ([#286])
v0.10.0
2024-04-30 12:45:29 +02:00
Martin HoffmannandGitHub bf163e1bd0 Make net not include tokio-rustls. (#305)
This PR removes tokio-rustls as a dependency of the net feature so you only
get TLS if you ask for it.
2024-04-29 17:59:20 +02:00
Martin Hoffmann 4cab467eb9 Update changelog. 2024-04-29 17:42:57 +02:00
Martin HoffmannandGitHub 95a7218048 Update dependencies. (#304)
This PR updates all dependencies to their latest major version. This
requires some changes to the examples using tokio-rustls.

This PR also updates the minimum supported Rust version to 1.70.

This is a breaking change.
2024-04-29 17:41:07 +02:00
Ximon EighteenandGitHub bd2a60aa80 Remove unnecesary cookie postprocessor handling. (#301) 2024-04-25 20:16:22 +02:00
Martin Hoffmann 4d75f47831 Update changelog. 2024-04-24 17:36:05 +02:00
Martin HoffmannandGitHub e86a8e2fe3 Improve Debug impl for IANA types. (#298)
This PR changes the Debug implementation of the types in base::iana to show
a value as the constant if it matches it. E.g., Class(1) is now shown as
Class::IN.
2024-04-24 17:34:59 +02:00
Martin Hoffmann 665e223a0a Update changelog. 2024-04-24 16:27:06 +02:00
Martin HoffmannandGitHub ff618106fa Add Message::for_slice_ref. (#300)
This PR adds a new method Message<_>::for_slice_ref which converts the
message to a Message<&[u8]>. This comes in handy when parsing the message
content into type that don’t allow unsized octets sequences like
AllRecordData<_, _>.
2024-04-24 16:24:34 +02:00
Ximon EighteenandGitHub 50301b1f16 Fix adding of EDNS options. (#299)
* Add a test showing that adding ENDS options doesn't preserve EDNS OPT header fields as it should.
* Add `OptBuilder::clone_from()` and use it to preserve EDNS OPT header fields when adding EDNS options.
2024-04-24 16:12:12 +02:00
Ximon EighteenandGitHub dd14e59b27 Fix compilation with feature zonefile by moving zonetree related functionality out of zonefile. (#297)
Also:
- Adds missing RustDoc.
- Renames `OwnerError` to `ContextError` (as missing NS is not an issue per se with the owner of the record).
- Renames `into_result()` to `unwrap()` as that is how it behaves.
2024-04-24 15:01:31 +02:00
Martin Hoffmann a76a56fb2f Update changelog. 2024-04-24 12:24:04 +02:00
Martin HoffmannandGitHub 994c6442d7 Make dname_from_addr public. (#289)
This PR makes the helper method dname_from_addr for creating the query name
for a reverse pointer query public as an associated function on Dname. It
also improves the IPv4 version by avoiding the FromStr impl and creating the
domain name more properly.
2024-04-24 12:20:39 +02:00
Ximon EighteenandGitHub 080b81eee9 Explicitly terminate mock client connections once they have received all of their responses, rather than leave them connected till the end of the test to shutdown when the server shuts down. (#295) 2024-04-22 13:47:50 +02:00
Martin HoffmannandGitHub 7bcabb88bd Redefine stub resolver transport types. (#296)
This PR redefines the stub resolver’s Transport::Udp type to be
Transport::UdpTcp, i.e., use UDP but retry with TCP if the answer is
truncated and slightly reworks the server selection code in the stub
resolver to use all servers if use_vc is set.

This is a breaking change.
2024-04-22 13:35:20 +02:00
Martin Hoffmann c080d810fc Update changelog. 2024-04-22 13:34:06 +02:00
Martin HoffmannandGitHub 47655265dd Rename *Dname* to *Name*. (#290)
This PR renames all types and functions that refer to domain name from using
the term “dname” to just “name.” For instance, Dname becomes Name, ToDname
becomes ToName, and ToDname::to_dname becomes ToName::to_name.

This annoyingly wide-reaching change is motivated by a clash with the DNAME
record type that would always be confusing. So we rather do it now.

This is a really breaking change. Apologies.
2024-04-22 13:31:34 +02:00