From: Jason A. Donenfeld Date: Tue, 22 May 2018 14:32:40 +0000 (+0200) Subject: wg-quick: darwin: do not remove routes when no real interface X-Git-Tag: v1.0.20191226~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52eb6a187cba591bcde884676beb54d68426c946;p=thirdparty%2Fwireguard-tools.git wg-quick: darwin: do not remove routes when no real interface Signed-off-by: Jason A. Donenfeld --- diff --git a/src/wg-quick/darwin.bash b/src/wg-quick/darwin.bash index 8387d85..566cfea 100755 --- a/src/wg-quick/darwin.bash +++ b/src/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" )