mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-15 10:49:18 +00:00
wgengine/magicsock: don't change DERP home when not connected to control
This pretty much always results in an outage because peers won't discover our new home region and thus won't be able to establish connectivity. Updates tailscale/corp#18095 Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: Ic0d09133f198b528dd40c6383b16d7663d9d37a7
This commit is contained in:
@@ -682,16 +682,7 @@ func (c *Conn) updateNetInfo(ctx context.Context) (*netcheck.Report, error) {
|
||||
ni.OSHasIPv6.Set(report.OSHasIPv6)
|
||||
ni.WorkingUDP.Set(report.UDP)
|
||||
ni.WorkingICMPv4.Set(report.ICMPv4)
|
||||
ni.PreferredDERP = report.PreferredDERP
|
||||
|
||||
if ni.PreferredDERP == 0 {
|
||||
// Perhaps UDP is blocked. Pick a deterministic but arbitrary
|
||||
// one.
|
||||
ni.PreferredDERP = c.pickDERPFallback()
|
||||
}
|
||||
if !c.setNearestDERP(ni.PreferredDERP) {
|
||||
ni.PreferredDERP = 0
|
||||
}
|
||||
ni.PreferredDERP = c.maybeSetNearestDERP(report)
|
||||
ni.FirewallMode = hostinfo.FirewallMode()
|
||||
|
||||
c.callNetInfoCallback(ni)
|
||||
|
Reference in New Issue
Block a user