-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(wsl-pro-service): Find host address when NAT + DNS tunneling ON (#…
…777) WSL version 2.2.1 (pre-release) turns DNS tunneling ON by default (again). With DNS tunneling activated, the Windows host IP no longer matches the nameserver IP found in /etc/resolv.conf but still matches the default gateway. When that was the case the nameserver IP would contain a loopback address, but since that version it contains an IP address of type 10.0.0.0/8 . Attempting to connect to such address always fails. If that behavior remains, we should change the wsl-pro-service IP selection to rely on the default gateway IP address for all cases when networking mode is not “mirrored”, for which case it must remain at 127.0.0.1 . That’s of now the preferred method to find the host IP address as documented in https://learn.microsoft.com/en-us/windows/wsl/networking#accessing-windows-networking-apps-from-linux-host-ip The gist is: we no longer need to read `/etc/resolv.conf`. --- UDENG-2761
- Loading branch information
Showing
8 changed files
with
9 additions
and
106 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
3 changes: 0 additions & 3 deletions
3
wsl-pro-service/internal/system/testdata/TestWindowsHostAddress/etc-resolv.conf.bad
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
wsl-pro-service/internal/system/testdata/TestWindowsHostAddress/etc-resolv.conf.bad-ip
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
wsl-pro-service/internal/system/testdata/TestWindowsHostAddress/etc-resolv.conf.good
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
wsl-pro-service/internal/system/testdata/TestWindowsHostAddress/etc-resolv.conf.loopback
This file was deleted.
Oops, something went wrong.
This file contains 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