From c98c413d3258737762761b4c602f1cc5ab4367d5 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 22 May 2018 16:32:40 +0200 Subject: wg-quick: darwin: do not remove routes when no real interface --- src/tools/wg-quick/darwin.bash | 1 + 1 file changed, 1 insertion(+) (limited to 'src/tools/wg-quick/darwin.bash') 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" ) -- cgit v1.2.3-59-g8ed1b