diff --git a/wgengine/magicsock/magicsock.go b/wgengine/magicsock/magicsock.go index 4af11e569..ff23a3dda 100644 --- a/wgengine/magicsock/magicsock.go +++ b/wgengine/magicsock/magicsock.go @@ -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