diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2020-09-11 17:22:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-11 17:22:55 +0200 |
commit | 52f758d608e8e6d9b27caf4d2e1295c413807108 (patch) | |
tree | 257926288b912ad54981b1f7286dee606d6d12b8 /src/os/shared.rs | |
parent | 32c330dc67bc5cf187d31875b3f2a2d95a840766 (diff) |
fix(dns): parsing of `/etc/resolv.conf` by manually updating `resolv-conf` crate (#184)
* Show the error cause if initializing a DNS resolver fails
* Manually bump `resolv-conf` to `master` at rev `83c0f25`
This fixes the parsing of `/etc/resolv.conf` with `options trust-ad`
which is e.g. used in `systemd-resolved-v246`[1].
Refs #166
[1] https://github.com/systemd/systemd/commit/a742f9828ea73d9c2c9bafe701c10fe60f058012
Diffstat (limited to 'src/os/shared.rs')
-rw-r--r-- | src/os/shared.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/os/shared.rs b/src/os/shared.rs index 4cc0c24..ea0f44d 100644 --- a/src/os/shared.rs +++ b/src/os/shared.rs @@ -238,7 +238,10 @@ pub fn get_input( let mut runtime = Runtime::new()?; let resolver = match runtime.block_on(dns::Resolver::new(runtime.handle().clone())) { Ok(resolver) => resolver, - Err(_) => failure::bail!("Could not initialize the DNS resolver. Are you offline?"), + Err(err) => failure::bail!( + "Could not initialize the DNS resolver. Are you offline?\n\nReason: {:?}", + err + ), }; let dns_client = dns::Client::new(resolver, runtime)?; Some(dns_client) |