diff options
Diffstat (limited to 'src')
| -rwxr-xr-x | src/wg-quick/darwin.bash | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wg-quick/darwin.bash b/src/wg-quick/darwin.bash index 0e87062..0179afb 100755 --- a/src/wg-quick/darwin.bash +++ b/src/wg-quick/darwin.bash @@ -131,14 +131,14 @@ add_if() { del_routes() { [[ -n $REAL_INTERFACE ]] || return 0 local todelete=( ) destination gateway netif - while read -r destination _ _ _ _ netif _; do + while read -r destination _ _ netif _; do [[ $netif == "$REAL_INTERFACE" ]] && todelete+=( "$destination" ) done < <(netstat -nr -f inet) for destination in "${todelete[@]}"; do cmd route -q -n delete -inet "$destination" >/dev/null || true done todelete=( ) - while read -r destination gateway _ netif; do + while read -r destination gateway _ netif _; do [[ $netif == "$REAL_INTERFACE" || ( $netif == lo* && $gateway == "$REAL_INTERFACE" ) ]] && todelete+=( "$destination" ) done < <(netstat -nr -f inet6) for destination in "${todelete[@]}"; do @@ -177,7 +177,7 @@ set_mtu() { cmd ifconfig "$REAL_INTERFACE" mtu "$MTU" return fi - while read -r destination _ _ _ _ netif _; do + while read -r destination _ _ netif _; do if [[ $destination == default ]]; then defaultif="$netif" break |
