wgengine/magicsock: add log message for randomly selecting endpoint

Change-Id: Iea3b74d87464de24d0f856161b5fb5b7a7843185
This commit is contained in:
Andrew Dunham 2023-09-11 18:35:43 -04:00
parent a6739e7988
commit 9209381a1b

View File

@ -341,6 +341,8 @@ func (de *endpoint) addrForWireGuardSendLocked(now mono.Time) (udpAddr netip.Add
// and give it a short trustBestAddrUntil time so we avoid flapping between
// addresses while waiting on latency information to be populated.
udpAddr = candidates[rand.Intn(len(candidates))]
de.c.logf("magicsock: addrForWireGuardSendLocked: no valid addr from latency, randomly selected endpoint %v", udpAddr)
}
de.bestAddr.AddrPort = udpAddr