diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-22 16:32:40 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-22 16:41:59 +0200 |
commit | c98c413d3258737762761b4c602f1cc5ab4367d5 (patch) | |
tree | 8b4904f62d481a578e6e9c9e14b9454f748485e8 /src/tools | |
parent | wg-quick: darwin: rename namefile environment variable (diff) | |
download | wireguard-monolithic-historical-c98c413d3258737762761b4c602f1cc5ab4367d5.tar.xz wireguard-monolithic-historical-c98c413d3258737762761b4c602f1cc5ab4367d5.zip |
wg-quick: darwin: do not remove routes when no real interface
Diffstat (limited to 'src/tools')
-rwxr-xr-x | src/tools/wg-quick/darwin.bash | 1 |
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" ) |