aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/wg-quick
diff options
context:
space:
mode:
authorRonan Pigott <rpigott@berkeley.edu>2019-08-27 18:42:14 -0700
committerJason A. Donenfeld <Jason@zx2c4.com>2019-08-27 20:29:17 -0600
commite5a754ec46737ae12436b5ce47f6fd9d613049e1 (patch)
treedd1632a24ca631e5a996b1a64b8ac3ed19fb77c1 /src/tools/wg-quick
parentcompat: account for android-4.9 backport of addr_gen_mode (diff)
downloadwireguard-monolithic-historical-e5a754ec46737ae12436b5ce47f6fd9d613049e1.tar.xz
wireguard-monolithic-historical-e5a754ec46737ae12436b5ce47f6fd9d613049e1.zip
wg-quick: linux: don't fail down when using systemd-resolved
systemd-resolved has a compatibility interface for use with resolvconf scripts when resolvectl is called from a symlink from resolvconf. However, when tearing down the interface, cmd_down calls del_if and then unset_dns. In the case of systemd-resolved, deleting the interface also removes the systemd-resolved entry and causes resolvconf -d to fail when resolvconf really is a symlink to resolvectl. This causes `wg-quick down` and 'wg-quick@.service' to exit with failure. Instead we use the resolvconf '-f' flag to ignore non-existent interfaces, supported by both openresolv and sd-resolved resolvconf. Signed-off-by: Ronan Pigott <rpigott@berkeley.edu> [zx2c4: moved -f argument to end to remain compatible with Debian's resolvconf]
Diffstat (limited to 'src/tools/wg-quick')
-rwxr-xr-xsrc/tools/wg-quick/linux.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/wg-quick/linux.bash b/src/tools/wg-quick/linux.bash
index 2f36dee..e690944 100755
--- a/src/tools/wg-quick/linux.bash
+++ b/src/tools/wg-quick/linux.bash
@@ -155,7 +155,7 @@ set_dns() {
unset_dns() {
[[ ${#DNS[@]} -gt 0 ]] || return 0
- cmd resolvconf -d "$(resolvconf_iface_prefix)$INTERFACE"
+ cmd resolvconf -d "$(resolvconf_iface_prefix)$INTERFACE" -f
}
add_route() {