tailscale/net/netmon
kari-ts 1a17ec1988
net/netmon: in Android, replace system/bin/ip call with cached LinkProperties gateway (#19804)
bind() on NETLINK_ROUTE sockets does not work on Android 11+ (https://developer.android.com/identity/user-data-ids#mac-11-plus) . Since system/bin/ip uses bind(), likelyHomeRouterIPHelper() always fails on Andoroid 11+, so that GatewayAndSelfIP never caches the result, causing repeated ip process spawns on every periodic ReSTUN.

This replaces the system/bin/ip fallback with a cached gateway IP pushed from Android’s ConnectivityManager via LinkProperties.getRoutes(). This is the same patterm used by UpdateLastKnownDefaultRouteInterface for the interface name (see https://github.com/tailscale/tailscale/pull/11784/). We keep the proc/net/route path as a fallback for early startup before NetworkChangeCallback has fired.

Updates tailscale/tailscale#18622
Updates tailscale/tailscale#13352

Signed-off-by: kari-ts <kari@tailscale.com>
2026-05-27 15:42:48 -07:00
..
defaultroute_bsd.go netns,wgengine: add OpenBSD support to netns via an rtable 2026-02-25 12:44:32 -08:00
defaultroute_darwin.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
interfaces_android.go net/netmon: in Android, replace system/bin/ip call with cached LinkProperties gateway (#19804) 2026-05-27 15:42:48 -07:00
interfaces_bsd.go netns,wgengine: add OpenBSD support to netns via an rtable 2026-02-25 12:44:32 -08:00
interfaces_bsdroute.go netns,wgengine: add OpenBSD support to netns via an rtable 2026-02-25 12:44:32 -08:00
interfaces_darwin_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
interfaces_darwin.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
interfaces_default_route_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
interfaces_defaultrouteif_todo.go netns,wgengine: add OpenBSD support to netns via an rtable 2026-02-25 12:44:32 -08:00
interfaces_linux_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
interfaces_linux.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
interfaces_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
interfaces_windows_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
interfaces_windows.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
interfaces.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
loghelper_test.go ipn/ipnlocal,net/netmon: make frequent darkwake more efficient 2026-04-06 15:46:51 -07:00
loghelper.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netmon_darwin_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netmon_darwin.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netmon_freebsd.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netmon_linux_test.go cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
netmon_linux.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netmon_polling.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netmon_test.go ipn/ipnlocal,net/netmon: make frequent darkwake more efficient 2026-04-06 15:46:51 -07:00
netmon_windows.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netmon.go ipn/ipnlocal,net/netmon: make frequent darkwake more efficient 2026-04-06 15:46:51 -07:00
polling.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
state.go ipn/ipnlocal,net/netmon: make frequent darkwake more efficient 2026-04-06 15:46:51 -07:00