Files
tailscale/net/netcheck
Luo Chen dc69869769 net/netcheck: never prefer a STUN-only region as the home DERP (#21976)
The PreferredDERP selection loop only considers RegionLatency, which
STUN probes populate for STUN-only regions too. When such a region is
the only one with a latency sample (e.g. self-hosted DERP behind a
TCP-only tunnel while a public STUN server is reachable), it gets
selected as the preferred DERP and all relay traffic blackholes, since
the region has no DERP server to relay through.

Filter STUN-only regions in the selection loop by reusing the existing
regionHasDERPNode predicate (renamed to CanServeDERP), which was
already applied to the HTTPS/ICMP fallback probing but not here.

Regions missing from the map, or present without any nodes, keep the
old behavior, as some tests use latency-only DERP maps.

Fixes #21975

Signed-off-by: Luo Chen <luochen1990@gmail.com>
2026-11-04 21:22:51 -08:00
..