Skip to content

Commit 617612a

Browse files
committed
deps: upgrade hickory to 0.25
There are a few breaking changes in the API that we need to tackle here, but they're generally fine. Since our libunbound crate uses hickory-proto, I had to upgrade that dep over there and reference the updated git rev here in this commit; we don't publish that to crates.io. The main thing that stood out in the upgrade is that the zone file parser used by the TestResolver now seems to create records with varying FQDN-ness. This may just be that it is now passing data through from the underlying zone data, but it caused a number of the SPF and DKIM test cases to fail without canonicalizing the names to FQDN. I chose to do that in the TestResolver rather than reviewing all the input zone data, with the rationale being that it is least surprising to have the test resolver fix that up than to puzzle over records not resolving due to a missing trailing dot when more tests are written in the future. This commit doesn't try to take advantage of the improvements to DNSSEC that are available in this version of hickory, it's just upgrading to the API changes. closes: #361
1 parent 0534d88 commit 617612a

8 files changed

Lines changed: 222 additions & 55 deletions

File tree

Cargo.lock

Lines changed: 162 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ hdrhistogram = "7.5"
9090
hex = "0.4"
9191
# Be sure to update the link to the docs in docs/reference/kumo.dns/configure_resolver.md
9292
# to match the version that we are using when you update this dep
93-
hickory-resolver = "0.24"
94-
hickory-proto = "0.24"
93+
hickory-resolver = "0.25"
94+
hickory-proto = "0.25"
9595
hierarchical_hash_wheel_timer = {version="1.2", default-features=false, features=["fx-hash"]}
9696
human_bytes = "0.4.3"
9797
humanize-rs = "0.1"
@@ -110,7 +110,7 @@ lapin = {version="2.5", default-features=false, features=["native-tls"]}
110110
lexicmp = "0.1"
111111
libc = "0.2.139"
112112
linkme = "0.3"
113-
libunbound = {git="https://github.com/KumoCorp/libunbound-rs.git", rev="514258fa097d04236761fff2f97b4221ff4965e0"}
113+
libunbound = {git="https://github.com/KumoCorp/libunbound-rs.git", rev="19b39a551b3cf7cbc69a7eb24fef4801e66c6260"}
114114
lipsum = "0.9"
115115
log = "0.4"
116116
lru-cache = "0.1"

crates/dns-resolver/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use anyhow::Context;
22
use arc_swap::ArcSwap;
3-
use hickory_resolver::error::ResolveResult;
43
pub use hickory_resolver::proto::rr::rdata::tlsa::TLSA;
54
use hickory_resolver::proto::rr::RecordType;
5+
use hickory_resolver::proto::ProtoError;
66
pub use hickory_resolver::Name;
77
use kumo_address::host::HostAddress;
88
use kumo_log_types::ResolvedAddress;
@@ -131,7 +131,7 @@ pub struct MailExchanger {
131131
expires: Option<Instant>,
132132
}
133133

134-
pub fn fully_qualify(domain_name: &str) -> ResolveResult<Name> {
134+
pub fn fully_qualify(domain_name: &str) -> Result<Name, ProtoError> {
135135
let mut name = Name::from_str_relaxed(domain_name)?.to_lowercase();
136136

137137
// Treat it as fully qualified

0 commit comments

Comments
 (0)