Skip to content
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 systemd-resolved DNS management #1968

Merged
merged 2 commits into from
Aug 6, 2020
Merged

Conversation

pinkisemils
Copy link
Collaborator

@pinkisemils pinkisemils commented Aug 5, 2020

Address some of the issues raised in #1952. The underlying issue is that the daemon would attempt to parse /etc/resolv.conf by a rather strict parser that would fail due to there being an unknown option being added to the file. The file is parsed to check if it contains the local resolver address to address cases where the user might've changed the file. This behavior has been removed, but we should test this out more extensively to see what happens on older distributions. The DNS management has also been simplified with systemd-resolved by not using it when the stub resolv.conf file is not symlinked. This is because in case the real resolv.conf file is being used, the glibc resolver will be used, and it will query the first 3 DNS servers listed in resolv.conf in order, switching over to the next one after a timeout - since the user usually has at least one other DNS server configured before they connect, there will always be a second of latency added to all DNS requests at best or they will always time out at worst, when connected to a tunnel. Thus, it's just easier to fall back to methods that will manage DNS in cruder ways.


This change is Reviewable

@pinkisemils pinkisemils requested a review from dlon August 5, 2020 14:47
Copy link
Member

@dlon dlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@pinkisemils pinkisemils merged commit 502d935 into master Aug 6, 2020
@pinkisemils pinkisemils deleted the fix-systemd-resolved-parsing branch August 6, 2020 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants