mirror of
https://github.com/ivanilves/xiringuito.git
synced 2025-05-21 01:30:27 -07:00
Merge pull request #67 from worr/patch-1
Ignore expired routes in `netstat` on macOS
This commit is contained in:
commit
d3d61149f6
@ -7,5 +7,5 @@ if [[ -n "${FORCE_NETWORK_SERVICE}" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
DEF_GW_IF=$(netstat -nr | grep default | awk '{print $NF}' | grep -v tun | tail -n1)
|
||||
DEF_GW_IF=$(netstat -nr | grep default | awk '!/tun|!/ {print $NF}' | tail -n1)
|
||||
networksetup -listnetworkserviceorder | grep -B1 " Device: ${DEF_GW_IF})" | head -n1 | sed 's/^(.*) //'
|
||||
|
Loading…
x
Reference in New Issue
Block a user