-
-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix parsing of /etc/resolv.conf
by manually updating resolv-conf
crate
#184
Conversation
ChangeLogs: * https://github.com/imsnif/bandwhich/releases/tag/0.18.1 * https://github.com/imsnif/bandwhich/releases/tag/0.18.0 Also applied a fix[1] for rDNS support which broke with `systemd-v246` because the `resolv-conf` crate didn't support the `options trust_ad`-declaration in systemd's `/etc/resolv.conf`[2]. [1] imsnif/bandwhich#184 [2] imsnif/bandwhich#166 (comment)
ChangeLogs: * https://github.com/imsnif/bandwhich/releases/tag/0.18.1 * https://github.com/imsnif/bandwhich/releases/tag/0.18.0 Also applied a fix[1] for rDNS support which broke with `systemd-v246` because the `resolv-conf` crate didn't support the `options trust_ad`-declaration in systemd's `/etc/resolv.conf`[2]. [1] imsnif/bandwhich#184 [2] imsnif/bandwhich#166 (comment) (cherry picked from commit 8149ab1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, interesting! Thanks for finding this and issuing the fix. I'll keep an eye on resolv-conf to see when they release a new version. I take it this solves the problem for you?
Also, could you run rustfmt so that the build passes?
src/os/shared.rs
Outdated
@@ -238,7 +238,7 @@ 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), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
This fixes the parsing of `/etc/resolv.conf` with `options trust-ad` which is e.g. used in `systemd-resolved-v246`[1]. Refs imsnif#166 [1] systemd/systemd@a742f98
Done.
Yes. |
See #166 (comment)
cc @imsnif