Created attachment 115493 [details] test case I'm using systemd-networkd and systemd-resolved for networking. I can get ip/route/nameserver from my router successfully through DHCP. But every time after the machine is suspended, the nameserver is reverted to the fallback ones. Only restarting networkd can make it get back to the nameserver assigned by the router. Restarting resolved and deleting /run/systemd/resolve/resolv.conf manually in between will not do the job. Other parts (ip/route) of the network are fine. I can get access to the internet before restarting systemd-networkd. /etc/systemd/network/dhcp.network: [Network] DHCP=v4 This is the only network file I have.
I can confirm this behavior, but I don't even need to suspend to see it happen, it just happens randomly. Restarting networkd fixes it for a short period of time, but then 5 minutes, 30 minutes, an hour later, my namservers are reset to the fallback. I'm using wpa_supplicant to manage my home wifi connection, and it could be possible that this is triggered by a brief loss of connection to the wifi network, which triggers some sort of action in networkd that ultimately leads to resolved failing to get nameservers and reverting to the fallback. I've had to hard-code my nameservers until this bug is fixed.
I also observe the same issue starting from v219. v218 worked fine. After resume from suspend, journalctl -u systemd-networkd shows just systemd-networkd[1440]: enp3s0 : lost carrier systemd-networkd[1440]: enp3s0 : DHCP lease lost systemd-networkd[1440]: enp3s0 : gained carrier systemd-networkd[1440]: enp3s0 : DHCPv4 address <addr> via <route> I only have one /etc/systemd/network/dhcp.network file, which contains [Match] Name=en* [Network] DHCP=v4 [DHCP] UseDomains=true
I am pretty sure this was fixed long ago. Let's close this. If this still is reproducible on current versions, please file a new bug in github
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.