Skip to content

Commit d3b40af

Browse files
committed
wg-quick: linux: deal with resolvconf migration more gracefully
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 <[email protected]> Signed-off-by: Jason A. Donenfeld <[email protected]>
1 parent 90deacd commit d3b40af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wg-quick/linux.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ set_mtu_up() {
143143
}
144144

145145
resolvconf_iface_prefix() {
146-
[[ -f /etc/resolvconf/interface-order ]] || return 0
146+
[[ -f /etc/resolvconf/interface-order && ! -L $(type -P resolvconf) ]] || return 0
147147
local iface
148148
while read -r iface; do
149149
[[ $iface =~ ^([A-Za-z0-9-]+)\*$ ]] || continue

0 commit comments

Comments
 (0)