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])
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.
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.
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])
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.
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.
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<_, _>.
* 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.
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.
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.
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.
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.