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

Default DNS in resolv.conf stops working after update #8336

Closed
1 of 2 tasks
Azuresonance opened this issue Apr 26, 2022 · 2 comments
Closed
1 of 2 tasks

Default DNS in resolv.conf stops working after update #8336

Azuresonance opened this issue Apr 26, 2022 · 2 comments

Comments

@Azuresonance
Copy link

Azuresonance commented Apr 26, 2022

Version

Microsoft Windows [Version 10.0.22598.1]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.102.1

Distro Version

Ubuntu 18.04

Other Software

ping, from iputils version s20190709

Repro Steps

  1. Turn on autogeneration of /etc/resolv.conf by making sure it isn't turned off in /etc/wsl.conf
  2. Make sure the /etc/resolv.conf is auto-generated
root@DaStallion:~# cat /etc/resolv.conf
    # This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
    # [network]
    # generateResolvConf = false
    nameserver 172.26.112.1
  1. Make sure that the auto-generated IP is indeed the windows host on the WSL subnet
    PS C:\Users\howar> netsh interface ip show config name="vEthernet (WSL)" Configuration for interface "vEthernet (WSL)" DHCP enabled: No IP Address: 172.26.112.1 Subnet Prefix: 172.26.112.0/20 (mask 255.255.240.0) InterfaceMetric: 5000 Statically Configured DNS Servers: None Register with which suffix: None Statically Configured WINS Servers: None
  2. Ping something in WSL, like cloudflare.com

Expected Behavior

I should be able to ping the cloudflare server.

Actual Behavior

The DNS resolution fails.
ping cloudflare.com ping: cloudflare.com: Temporary failure in name resolution

However, it works if:

  1. I used a manually written /etc/resolv.conf.
  2. I pinged from Windows Powershell, which has no manually configured DNS
  3. I pinged an IP address

I ran wireshark to capture the packets, and I can see that WSL did send a query, but got no DNS response.
image

Diagnostic Logs

Here's my WSL log:
wsl.etl.zip

Here's my strace log:
trace.txt

@ghost ghost self-assigned this May 3, 2022
@OneBlue
Copy link
Collaborator

OneBlue commented May 3, 2022

/dupe #8365

@OneBlue OneBlue closed this as completed May 3, 2022
@ghost
Copy link

ghost commented May 3, 2022

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants