summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-22 16:32:40 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-22 16:41:59 +0200
commitc98c413d3258737762761b4c602f1cc5ab4367d5 (patch)
tree8b4904f62d481a578e6e9c9e14b9454f748485e8
parentwg-quick: darwin: rename namefile environment variable (diff)
downloadwireguard-monolithic-historical-c98c413d3258737762761b4c602f1cc5ab4367d5.tar.xz
wireguard-monolithic-historical-c98c413d3258737762761b4c602f1cc5ab4367d5.zip
wg-quick: darwin: do not remove routes when no real interface
-rwxr-xr-xsrc/tools/wg-quick/darwin.bash1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/wg-quick/darwin.bash b/src/tools/wg-quick/darwin.bash
index 8387d85..566cfea 100755
--- a/src/tools/wg-quick/darwin.bash
+++ b/src/tools/wg-quick/darwin.bash
@@ -107,6 +107,7 @@ add_if() {
}
del_routes() {
+ [[ -n $REAL_INTERFACE ]] || return 0
local todelete=( ) destination gateway netif
while read -r destination _ _ _ _ netif _; do
[[ $netif == "$REAL_INTERFACE" ]] && todelete+=( "$destination" )