aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2025-05-23 20:59:38 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2025-05-23 21:01:53 +0200
commitd3b40aff964789a2a0533cb7a070592a75a996e3 (patch)
treec0d2fd3f0e383e951f127320b22431841a6f1cd0
parentwg-quick: pass on # comments to {Pre,Post}{Up,Down} (diff)
downloadwireguard-tools-master.tar.xz
wireguard-tools-master.zip
wg-quick: linux: deal with resolvconf migration more gracefullyHEADmaster
When Ubuntu systems upgrade from Debian's atrocious resolvconf to the systemd-resolve symlink, they sometimes leave around /etc/resolvconf/interface-order, which then winds up breaking the detection and passing the bogus 'tun.' prefix to systemd's resolvconf, resulting in failure. Work around this by only doing the 'tun.' prefix hack if resolvconf isn't a symlink. This is ugly but so it goes. Reported-by: Andrei Borzenkov <arvidjaar@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rwxr-xr-xsrc/wg-quick/linux.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wg-quick/linux.bash b/src/wg-quick/linux.bash
index f56f6e4..af255af 100755
--- a/src/wg-quick/linux.bash
+++ b/src/wg-quick/linux.bash
@@ -143,7 +143,7 @@ set_mtu_up() {
}
resolvconf_iface_prefix() {
- [[ -f /etc/resolvconf/interface-order ]] || return 0
+ [[ -f /etc/resolvconf/interface-order && ! -L $(type -P resolvconf) ]] || return 0
local iface
while read -r iface; do
[[ $iface =~ ^([A-Za-z0-9-]+)\*$ ]] || continue