Fix parsing of /etc/resolv.conf by manually updating resolv-conf crate#184
Merged
imsnif merged 2 commits intoimsnif:mainfrom Sep 11, 2020
Merged
Fix parsing of /etc/resolv.conf by manually updating resolv-conf crate#184imsnif merged 2 commits intoimsnif:mainfrom
/etc/resolv.conf by manually updating resolv-conf crate#184imsnif merged 2 commits intoimsnif:mainfrom
Conversation
Ma27
added a commit
to NixOS/nixpkgs
that referenced
this pull request
Sep 11, 2020
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)
Ma27
added a commit
to NixOS/nixpkgs
that referenced
this pull request
Sep 11, 2020
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)
imsnif
approved these changes
Sep 11, 2020
Owner
imsnif
left a comment
There was a problem hiding this comment.
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
| 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), |
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
Contributor
Author
Done.
Yes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #166 (comment)
cc @imsnif