summaryrefslogtreecommitdiffhomepage
path: root/control/controlknobs
diff options
context:
space:
mode:
authorJonathan Nobels <jnobels@gmail.com>2024-05-01 09:20:09 -0400
committerGitHub <noreply@github.com>2024-05-01 09:20:09 -0400
commitfa1303d6327ba81cfa44a9b99aab542d13d0d688 (patch)
treed31fb0978b30f4b29e4f2e4aa4f6ad9a5a5a311c /control/controlknobs
parentde85610be02de2f89bbd3d69d24773fc6382b547 (diff)
downloadtailscale-fa1303d6327ba81cfa44a9b99aab542d13d0d688.tar.xz
tailscale-fa1303d6327ba81cfa44a9b99aab542d13d0d688.zip
net/netmon: swap to swift-derived defaultRoute on macos (#11936)
Updates tailscale/corp#18960 iOS uses Apple's NetworkMonitor to track the default interface and there's no reason we shouldn't also use this on macOS, for the same reasons noted in the comments for why this change was made on iOS. This eliminates the need to load and parse the routing table when querying the defaultRouter() in almost all cases. A slight modification here (on both platforms) to fallback to the default BSD logic in the unhappy-path rather than making assumptions that may not hold. If netmon is eventually parsing AF_ROUTE and able to give a consistently correct answer for the default interface index, we can fall back to that and eliminate the Swift dependency. Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
Diffstat (limited to 'control/controlknobs')
0 files changed, 0 insertions, 0 deletions