net/tsdial: tolerate empty default route on Plan 9

Otherwise this was repeated closing control/derp connections all the time
on netmon changes. Arguably we should do this on all platforms?

Updates #5794

Change-Id: If6bbeff554235f188bab2a40ab75e08dd14746b2
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick 2025-04-01 04:01:00 -07:00 committed by Brad Fitzpatrick
parent 7426a36371
commit 5df06612aa

View File

@ -242,7 +242,7 @@ func changeAffectsConn(delta *netmon.ChangeDelta, conn net.Conn) bool {
// In a few cases, we don't have a new DefaultRouteInterface (e.g. on
// Android; see tailscale/corp#19124); if so, pessimistically assume
// that all connections are affected.
if delta.New.DefaultRouteInterface == "" {
if delta.New.DefaultRouteInterface == "" && runtime.GOOS != "plan9" {
return true
}