mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
fa1303d632
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> |
||
---|---|---|
.. | ||
defaultroute_bsd.go | ||
defaultroute_darwin.go | ||
interfaces_android.go | ||
interfaces_bsd.go | ||
interfaces_darwin_test.go | ||
interfaces_darwin.go | ||
interfaces_default_route_test.go | ||
interfaces_defaultrouteif_todo.go | ||
interfaces_freebsd.go | ||
interfaces_linux_test.go | ||
interfaces_linux.go | ||
interfaces_test.go | ||
interfaces_windows_test.go | ||
interfaces_windows.go | ||
netmon_darwin_test.go | ||
netmon_darwin.go | ||
netmon_freebsd.go | ||
netmon_linux_test.go | ||
netmon_linux.go | ||
netmon_polling.go | ||
netmon_test.go | ||
netmon_windows.go | ||
netmon.go | ||
polling.go | ||
state.go |