wgengine/magicsock: enable DERP Return Path Optimization (DRPO)

Turning this on at the beginning of the 1.21.x dev cycle, for 1.22.

Updates #150

Change-Id: I1de567cfe0be3df5227087de196ab88e60c9eb56
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/3735/head
Brad Fitzpatrick 3 years ago committed by Brad Fitzpatrick
parent c6c39930cc
commit 5a317d312d

@ -68,7 +68,7 @@ func useDerpRoute() bool {
if v, ok := ob.Get(); ok {
return v
}
return false
return true // as of 1.21.x
}
// peerInfo is all the information magicsock tracks about a particular
@ -1584,6 +1584,8 @@ func (c *Conn) runDerpReader(ctx context.Context, derpFakeAddr netaddr.IPPort, d
continue
case derp.HealthMessage:
health.SetDERPRegionHealth(regionID, m.Problem)
case derp.PeerGoneMessage:
c.removeDerpPeerRoute(key.NodePublic(m), regionID, dc)
default:
// Ignore.
continue

Loading…
Cancel
Save