Skip to content

Commit

Permalink
chore: replace trust-dns-resolver with hickory-resolver
Browse files Browse the repository at this point in the history
For security vulnerability

ID: RUSTSEC-2024-0421
Advisory: https://rustsec.org/advisories/RUSTSEC-2024-0421
  • Loading branch information
doitian committed Dec 18, 2024
1 parent 3166f21 commit 035f66e
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 61 deletions.
105 changes: 47 additions & 58 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sentry = { version = "0.34.0", optional = true }
faster-hex = { version = "0.6", optional = true }
ckb-hash = { path = "../util/hash", version = "= 0.121.0-pre" }
secp256k1 = { version = "0.30", features = ["recovery"], optional = true }
trust-dns-resolver = { version = "0.23", optional = true }
hickory-resolver = { version = "0.24.2", optional = true }
snap = "1"
ckb-types = { path = "../util/types", version = "= 0.121.0-pre" }
ipnetwork = "0.20"
Expand Down Expand Up @@ -57,7 +57,7 @@ serde-wasm-bindgen = "0.6.5"

[features]
with_sentry = ["sentry"]
with_dns_seeding = ["bs58", "faster-hex", "trust-dns-resolver", "secp256k1"]
with_dns_seeding = ["bs58", "faster-hex", "hickory-resolver", "secp256k1"]
fuzz = []

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion network/src/services/dns_seeding/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl DnsSeedingService {
let pubkey = PublicKey::from_slice(&pubkey_bytes)
.map_err(|err| format!("create PublicKey failed: {err:?}"))?;

let resolver = trust_dns_resolver::AsyncResolver::tokio_from_system_conf()
let resolver = hickory_resolver::AsyncResolver::tokio_from_system_conf()
.map_err(|err| format!("Failed to create DNS resolver: {err}"))?;

let mut addrs = Vec::new();
Expand Down

0 comments on commit 035f66e

Please sign in to comment.