wgengine/magicsock: never set a DERP server as a roamAddr.

DERP traffic is asymmetric by design, with nodes always sending
to their peer's home DERP server. However, if roamAddr is set,
magicsock will always push data there, rather than let DERP
server selection do its thing, so we end up accidentally
creating a symmetric flow.

Signed-Off-By: David Anderson <danderson@tailscale.com>
pull/149/head
David Anderson 4 years ago committed by Dave Anderson
parent 4f5c0da1ae
commit 2839854994

@ -1098,6 +1098,11 @@ func (a *AddrSet) UpdateDst(new *net.UDPAddr) error {
// Packet from current-priority address, no logging.
// This is a hot path for established connections.
return nil
} else if new.IP.Equal(derpMagicIP) {
// Never pick DERP addresses as a roaming addr. DERP obeys its
// own endpoint selection logic.
// This is a hot path for established connections.
return nil
}
index := -1

Loading…
Cancel
Save