aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-xsrc/wg-quick/darwin.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wg-quick/darwin.bash b/src/wg-quick/darwin.bash
index c77441f..8e46818 100755
--- a/src/wg-quick/darwin.bash
+++ b/src/wg-quick/darwin.bash
@@ -194,14 +194,14 @@ collect_gateways() {
GATEWAY4=""
while read -r destination gateway _; do
- [[ $destination == default ]] || continue
+ [[ $destination == default && $gateway != "link#"* ]] || continue
GATEWAY4="$gateway"
break
done < <(netstat -nr -f inet)
GATEWAY6=""
while read -r destination gateway _; do
- [[ $destination == default ]] || continue
+ [[ $destination == default && $gateway != "link#"* ]] || continue
GATEWAY6="$gateway"
break
done < <(netstat -nr -f inet6)