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

Don't hijack DNS config when localhost is used #6861

Merged
merged 2 commits into from
Sep 25, 2024
Merged

Conversation

dlon
Copy link
Member

@dlon dlon commented Sep 24, 2024

If the resolver is set to (e.g.) 127.0.0.1, don't replace it with 10.64.0.1. Hopefully prevents some fighting with other software.

This does not change affect any of the firewall rules.

Close DES-1227.


This change is Reviewable

Copy link

linear bot commented Sep 24, 2024

@dlon dlon added the macOS Issues related to macOS label Sep 24, 2024
Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 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, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dlon)


talpid-core/src/dns/macos.rs line 196 at r1 (raw file):

        set.filter_map(|addr| addr.parse::<IpAddr>().ok())
            .find(|addr| addr.is_loopback())
            .is_some()

As clippy suggets, prefer any here 😊

set.filter_map(|addr| addr.parse::<IpAddr>().ok())
   .any(|addr| addr.is_loopback())

Code quote:

            .find(|addr| addr.is_loopback())
            .is_some()

Copy link
Member Author

@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.

Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @MarkusPettersson98)


talpid-core/src/dns/macos.rs line 196 at r1 (raw file):

Previously, MarkusPettersson98 (Markus Pettersson) wrote…

As clippy suggets, prefer any here 😊

set.filter_map(|addr| addr.parse::<IpAddr>().ok())
   .any(|addr| addr.is_loopback())

Done.

Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

dlon and others added 2 commits September 25, 2024 10:41
Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net>
@dlon dlon merged commit b806916 into main Sep 25, 2024
49 of 50 checks passed
@dlon dlon deleted the macos-ignore-loopback-dns branch September 25, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macOS Issues related to macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants