Files
tailscale/tsconst
Nick Khyl 503010831e net/{netmon,tstun},tsconst: avoid enumerating all interfaces when retrieving the default
GetWindowsDefault called GetAdaptersAddresses to build a map of every
adapter before walking the routing table. Enumerating adapters is
expensive on Windows and, since the call doesn't skip DNS info, it also
goes through the DNS Client service, which on recent Windows builds
enumerates every interface for each DNS server on each adapter.

In this PR, we query only what we need: the routing table, the metric
of each interface with a default route, and the interface row for routes
that beat the current best. We also identify the Tailscale interface by
its Wintun GUID rather than by its description, and move the GUID to
tsconst so that net/tstun and net/netmon share it.

Updates #17772
Updates #21885

Change-Id: I4c6a9d9ed791788fb0567154ee1dbe0f6a2c52a2
Signed-off-by: Nick Khyl <[email protected]>
2026-11-07 12:29:01 -08:00
..