[PR #2241] fix(Ubuntu 24.04): DNS resolution fails when VPN connects due to systemd-resolved restart #2720

Open
opened 2026-10-14 21:04:16 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amnezia-client/pull/2241
Author: @pavelzak
Created: 2/19/2026
Status: 🔄 Open

Base: dev ← Head: dns-fix


📝 Commits (2)

  • dfa9659 fix(linux): DNS resolution fails when VPN connects due to systemd-resolved restart
  • 2d1988b fix(linux): remove destructive systemd-resolved restart fallback

📊 Changes

3 files changed (+32 additions, -7 deletions)

View changed files

📝 client/daemon/daemonlocalserver.cpp (+2 -1)
📝 client/platforms/linux/daemon/dnsutilslinux.cpp (+13 -3)
📝 service/server/router_linux.cpp (+17 -3)

📄 Description

flushDns() was restarting systemd-resolved via systemctl restart, which killed the D-Bus connection while async DNS configuration
calls (SetLinkDNS, SetLinkDefaultRoute, Domains query) from DnsUtilsLinux were still in-flight. This caused all D-Bus calls to
fail with NoReply, leaving DNS unconfigured on the VPN interface.

  • Use resolvectl flush-caches instead of restarting systemd-resolved, with fallback to restart for older distros
  • Add D-Bus error detail logging (error name + message) to dnsCallCompleted and dnsDomainsReceived
  • Add QDBusInterface validity check at construction time
  • Add errno details to ifindex resolution failure
  • Fix double-space typo in "DNS domains" log message

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amnezia-client/pull/2241 **Author:** [@pavelzak](https://github.com/pavelzak) **Created:** 2/19/2026 **Status:** 🔄 Open **Base:** `dev` ← **Head:** `dns-fix` --- ### 📝 Commits (2) - [`dfa9659`](https://github.com/amnezia-vpn/amnezia-client/commit/dfa9659ea6823a06259f7f1e45c090507d519305) fix(linux): DNS resolution fails when VPN connects due to systemd-resolved restart - [`2d1988b`](https://github.com/amnezia-vpn/amnezia-client/commit/2d1988b6b313cbd2b01015af92c6f477eb0e3912) fix(linux): remove destructive systemd-resolved restart fallback ### 📊 Changes **3 files changed** (+32 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `client/daemon/daemonlocalserver.cpp` (+2 -1) 📝 `client/platforms/linux/daemon/dnsutilslinux.cpp` (+13 -3) 📝 `service/server/router_linux.cpp` (+17 -3) </details> ### 📄 Description flushDns() was restarting systemd-resolved via systemctl restart, which killed the D-Bus connection while async DNS configuration calls (SetLinkDNS, SetLinkDefaultRoute, Domains query) from DnsUtilsLinux were still in-flight. This caused all D-Bus calls to fail with NoReply, leaving DNS unconfigured on the VPN interface. - Use resolvectl flush-caches instead of restarting systemd-resolved, with fallback to restart for older distros - Add D-Bus error detail logging (error name + message) to dnsCallCompleted and dnsDomainsReceived - Add QDBusInterface validity check at construction time - Add errno details to ifindex resolution failure - Fix double-space typo in "DNS domains" log message --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#2720
No description provided.