wg-quick: darwin: do not remove routes when no real interface
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
59dae33e9a
commit
52eb6a187c
|
@ -107,6 +107,7 @@ add_if() {
|
||||||
}
|
}
|
||||||
|
|
||||||
del_routes() {
|
del_routes() {
|
||||||
|
[[ -n $REAL_INTERFACE ]] || return 0
|
||||||
local todelete=( ) destination gateway netif
|
local todelete=( ) destination gateway netif
|
||||||
while read -r destination _ _ _ _ netif _; do
|
while read -r destination _ _ _ _ netif _; do
|
||||||
[[ $netif == "$REAL_INTERFACE" ]] && todelete+=( "$destination" )
|
[[ $netif == "$REAL_INTERFACE" ]] && todelete+=( "$destination" )
|
||||||
|
|
Loading…
Reference in New Issue