Releases: NLnetLabs/domain
0.9.0
Breaking changes
- Move the
flatten_intomethod for converting domain names into a straight, flat form into a newFlattenIntotrait. This trait is only implemented for types that actually are or contain domain names. (#216) - Marked various methods and functions that return values without side effects as
#[must_use]. ([#228] by @WhyNotHugo) - Changed the signature of
FoundSrvs::mergeto use a non-mutother. (#232) - The minimum Rust version is now 1.67. (#235)
New
0.8.1
New
- Added a new method
FoundSrvs::into_srvsthat converts the value into an iterator over the found SRV records without resolving them further. (#174, #214 by @WhyNotHugo); this was added in 0.7.2 but missing in 0.8.0) - Added impl of
Borrow<Dname<[u8]>>andAsRef<Dname<[u8]>>forDname<_>. (#219 by [@iximeow}], #225) - Added
Dname::fmt_with_dotthat can be used when wanting to display a domain name with a dot at the end. (#210)
Bug Fixes
- Fixed trait bounds on
FoundSrvs::into_streamto make it usable again. (#174, [#214 by @WhyNotHugo]; this was fixed in 0.7.2 but missing in 0.8.0) - Fixed scanning of domain names that are just the root label. (#210)
- Fixed
util::base64::SymbolConverterto also include the final group in the output if there is padding. (#212)
0.8.0
Breaking Changes
- The minimal required Rust version is now 1.65. (#160)
- The
randomfeature has been dropped in favour of usingrand. (#204) - The generic octets foundation has been moved to a new crate octseq and completely revamped with Generic Associated Types stabilized in Rust 1.65. This required changes all over the code but, hopefully, should result in relatively few changes when using the crate. (#160)
- The range, slice, and split methods on the domain name types have changed. They have been merge into a single method taking ranges – except for those on
Dnamethat require type changes. The split methods now take references and don’t changeselfanymore. (#160) - The
Parse,Compose, andScantraits have been demoted to mere extension traits for foreign types (primarily the built-in integers, so that you can do things likeu16::parse). All other types now simply have methods matching the patterns. Where generics are necessary, dedicated traits have been added. E.g., there now areParseRecordDataandComposeRecordDatatraits that are implemented by all record data types. (#160) - The
DerefandDerefMutimpls have been removed for most types that had them to follow guidance that they are exclusively for use by pointer types – which none of them are.lenandis_emptymethods have been added where appropriate, additional methods may be added. (#205) - Various functions and methods of the
tsigmodule now expect the current time as an argument to allow use of the module in a no-std environment. (#152) - Parsing of representation format and zonefiles has been completely re-written. (#142, based on work in #109 by Martin Fischer)
- All types that wrap an octets sequence only now allow unsized octets sequence types. They all have an associated function
from_sliceto create a reference to a value wrapping an (unsized) octets slice and methodfor_slicethat converts a&selfinto such a reference. Where the latter already existed but returned a value wrapping a&[u8](e.g.,Dname<_>andMessage<_>, the return type has changed accordingly. (#168) - Removed
CharStr::from_bytes. UseCharStr::from_octetsinstead. (#168) Message::from_octetsnow returns a new error typeShortMessage. (#168)- Dropped
Derefimpls forDname<_>,RelativeDname<_>. (#168) - Renamed
opt::KeyTag::newtoopt::KeyTag::from_octets. (#168) - Renamed
rdata::Txt::try_from_slicetobuild_from_slice. (#168) - The
newmethod of the following record data types now check whether the wire format representation of the record data is too long and thus returns a result:Tsig<_, _>,Dnskey<_>,Rrsig<_, _>,Ds<_>,Cdnskey<_>,Cds<_>. (#169) - The
newfunction forrdata::Null<_>has been replaced with afrom_octetsandfrom_slicepair. TheDerefimpl was removed. (#169) - The
rdata::svcbmodule has been refactored to work in the same way as other type-length-value constructs. The names of types, methods, and functions have changed both to match the usual nomenclature as well as to match the terms used in the SVCB draft. (#176) - The
base::iana::SvcbParamKeytype has been renamed toSvcParamKeyto match the terms used in the SVCB draft. (#176) - The
TcpKeepaliveoption has been changed to use anOption<u16>as its data and allow for an empty option in accordance with the RFC. (#185) - Renamed the sub-modules of
rdatathat contain record data types to use a name derived from their content rather than their RFC number – with the exception ofrdata::rfc1035. (#189) - Renamed the sub-modules of
base::optthat contain option data types to use short-hand names rather than their RFC number. (#190) - TTL values are now using a newtype
base::record::Ttlthat wraps the rawu32and improves conversions. (#202 by @CrabNejonas) - Changes all option data types to ensure their wire format is at most 65,535 octets long. This requires changing the signatures of some creator functions. Their naming scheme and signatures are also changed to follow the pattern established with record data. (#193)
- Renamed
UnknownOptData::from_octetstonewand return a result. (#193) - Completely redesigns DNS cookie options, adding support for standard server cookies introduced in RFC 9018. (#193)
- Change the type of
ExtendedError’s text toStr<Octs>and change the return type ofset_textto(). (#193) - Changed the type
TcpKeepalive’s content to a newtypeIdleTimeoutto make it easier to convert to and from durations. (#193) - Changes Padding to just contain the padding octets and drop
PaddingMode. Instead, the methods onOptBuildershould be used to add padding. (#193)
New
Displayimpls are now available for all EDNS0 options. (#157)- Adds a
FromStrimplementation and related functions toRelativeDname. (#177) - Add a
Debugimpl tobase::message::Messageso it can be unwrapped etc. (#199) - New methods
make_canonicalonDnameandRelativeDnamethat convert the name into its canonical, i.e., lowercase form. Similarly, new methodsToDname::to_canonical_dnameandToRelativeDname::to_canonical_relative_dnamethat produce new
canonical names. (#200) - Added a
MAX_LENconstant to various types that wrap length-limited octets sequences. (#201 by @CrabNejonas)
0.7.2
0.7.1
0.7.0
Breaking Changes
-
The minimum supported Rust version is now 1.56.1. (#128)
-
The
OctetsBuildertrait does not requireAsRef<[u8]>andAsMut<[u8]>any more. These have been added as explicit trait bounds where needed. In return,Cow<[u8]>can now be used as an octets builder whereAsMut<[u8]>is not needed. (#130). -
The
Displayimplementation forUncertainDnamenow ends an absolute name with a dot to match the behaviour of theFromStrimplementation. (#116) -
The salt and hash parameters of
Nsec3andNsec3Paramhave been wrapped in newtypes. (#116) -
Functions depending on the
randcrate have been moved behind a newrandomfeature asrandis not available on all systems, even with std support. The feature is, however, part of the default features.In particular, this means that
Header::set_random_id,MessageBuilder::request_axfr, andopt::rfc7830::PaddingMode::Randomare only available if the feature is enabled. (#117 by @Jezza) -
resolv::Resolver::Querynow has to beSend. This will allow the resolver to be used in async functions spawned onto a Tokio runtime.The stub resolver’s query struct is already Send, so no actual changes are necessary. However, because this changes the definition of the Resolver trait, this is a breaking change, anyway. (#125)
New
- ``base::header::Flag` for easier working for the flags of a message header. (#109 by @tomaskrizek)
base::name::OwnedLabelnow implementsCloneandCopyas well asDisplayandDebug. (#112)base::record::Record::into_owner_and_nameallows decomposing a record into its two parts that aren’tCopy. (#114)- Initial support for SVCB and HTTPS record types. (#115 by @xofyarg)
- Introduced Serde support for all relevant types. (#116)
- The
OctetsBuildertrait is now also implemented for mutable references of types that are octet builders and turn into themselves when frozen (i.e.,OctetsBuilder::Octets = Self). (#121) - Support for [
heapless::Vec<u8, N>] as an octets sequence via the newheaplessfeature. (#122 by @bugadani) - The parameter types for SVCB record data now also implement
Eq(#135)
Bug Fixes
- Correctly encode and decode the address in EDNS client subnet when the number of bits isn’t divisible by 8. (#101 and #102 by @xofyarg)
validate:- Support for no-std environments now actually works. (#117 by @Jezza)
- Canonalize IANA types when scanning so that, e.g.,
CLASS3becomesClass::Chinstead ofClass::Int(3). (#127 by @vavrusa) resolv: Fixed generation of the domain name to be used for reverse IPv6 lookups. (#131)
Other Changes
- Enable
doc_cfgfeature flag documentation for docs.rs. (#104 by Martin Fischer)
0.6.1
0.6.0
Breaking Changes
- The crate
domain-resolvhas been merged into this crate as thedomain::resolvcrate. It requires theresolvfeature to be enabled. Thesyncfeature fromdomain-resolvhas been renamed toresolv-sync. (#74) - The trait
domain::base::octets::IntoOctetshas been merged intodomain::base::octets::OctetsBuilder. It’s methodinto_octetsis now available asfreezeonOctetsBuilder. (#75) - Upgrade to tokio 1.0, bytes 1.0, and latest of other dependencies (#84 by @koivunej)
New
- Support for extended errors defined in RFC 8914. (#79 by @xofyarg)
- New traits
domain::base::octets::OctetsFromandOctetsIntoto convert types that are generic over octets sequences between different octets sequences. (#77)
Bug Fixes
- Fix domain name compressors when giving a root label only. (#76 by @vavrusa)
- Fix OptIter not skipping over other options correctly. (#76 by @vavrusa)
- Fix canonical comparison of TXT RDATA by taking the length labels into account. (#76 by @vavrusa)
- Fix parser not rejecting malformed TXT RDATA. (#80 by @vavrusa)
- Resolver: Host lookup now considers possibly separate CNAME chains for the responses to the A and AAAA queries. (#90 by [@varusa])
domain 0.5.3 & domain-resolv 0.5.1
domain 0.5.3
New
Bug Fixes
- Various minor fixes for building in no-std mode. (#72)
domain-resolv 0.5.1
New
- The UDP payload size announced in a request can now be set as part of the
server config. It defaults to 1232 octets for both IPv4 and IPv6. (#71)
Bug Fixes
- The receive buffer size was smaller than the size advertised in a request,
resulting to very long UDP responses being cut off. (#71)