aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-02-16 12:46:39 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-02-16 12:46:39 -0800
commitbfdeb3439a617890a807a1ac643f84038b43f165 (patch)
treeeeecd3d0d8a4d361129564662aa33f1a0e53aa3c
parentb2a4403c70b4f1b270cb8d0d26480789b559c4fc (diff)
downloadgeniza-bfdeb3439a617890a807a1ac643f84038b43f165.tar.gz
geniza-bfdeb3439a617890a807a1ac643f84038b43f165.zip
update DNS library to get bugfix
-rw-r--r--Cargo.lock6
-rw-r--r--Cargo.toml6
-rw-r--r--src/discovery.rs4
3 files changed, 10 insertions, 6 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 76cab03..047a8f9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -251,7 +251,7 @@ dependencies = [
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"protobuf 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
- "resolve 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "resolve 0.1.2 (git+https://github.com/murarth/resolve)",
"rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"sodiumoxide 0.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
"tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -398,7 +398,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "resolve"
version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+https://github.com/murarth/resolve#4353b11d31224967277a4662ea2ebb389f6e448d"
dependencies = [
"idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -694,7 +694,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
"checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f"
"checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957"
-"checksum resolve 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a40df559bf6f525f5543572ca8c2a49c96c3ca0debfcb00c499dce9bf4ff548"
+"checksum resolve 0.1.2 (git+https://github.com/murarth/resolve)" = "<none>"
"checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a"
"checksum rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "aee45432acc62f7b9a108cc054142dac51f979e69e71ddce7d6fc7adf29e817e"
"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
diff --git a/Cargo.toml b/Cargo.toml
index 4788816..400011d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,11 +16,15 @@ log = "0.3"
sodiumoxide = "0.0.16"
bit_field = "0.9"
bit-vec = "0.4.4"
-resolve = "0.1.2"
data-encoding = "2.0"
chan = "0.1.20"
chan-signal = "0.3.1"
+# Temporarily need to use github master instead of crates version to get a
+# bugfix.
+[dependencies.resolve]
+git = "https://github.com/murarth/resolve"
+
[dev-dependencies]
tempdir = "0.3"
assert_cli = "0.5"
diff --git a/src/discovery.rs b/src/discovery.rs
index aef2a60..47a0cc4 100644
--- a/src/discovery.rs
+++ b/src/discovery.rs
@@ -3,7 +3,7 @@ use errors::*;
use std::net::{IpAddr, SocketAddr};
use make_discovery_key;
use data_encoding::HEXLOWER;
-use resolve::{self, DnsConfig, DnsResolver, resolve_host};
+use resolve::{DnsConfig, DnsResolver, resolve_host};
use resolve::record::Srv;
pub fn discover_peers_dns(dat_key: &[u8]) -> Result<Vec<SocketAddr>> {
@@ -16,7 +16,7 @@ pub fn discover_peers_dns(dat_key: &[u8]) -> Result<Vec<SocketAddr>> {
let dns1: Vec<IpAddr> = resolve_host("discovery1.publicbits.org")?.collect();
let dns2: Vec<IpAddr> = resolve_host("discovery2.publicbits.org")?.collect();
- let default_config = resolve::default_config()?;
+ let default_config = DnsConfig::load_default()?;
let config = DnsConfig {
name_servers: vec![
SocketAddr::from((dns1[0], 53)),