From 9209381a1b670730a721632e5dd4eeb0504ccccf Mon Sep 17 00:00:00 2001 From: Andrew Dunham Date: Mon, 11 Sep 2023 18:35:43 -0400 Subject: [PATCH] wgengine/magicsock: add log message for randomly selecting endpoint Change-Id: Iea3b74d87464de24d0f856161b5fb5b7a7843185 --- wgengine/magicsock/endpoint.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wgengine/magicsock/endpoint.go b/wgengine/magicsock/endpoint.go index 36a265956..15c6c8b64 100644 --- a/wgengine/magicsock/endpoint.go +++ b/wgengine/magicsock/endpoint.go @@ -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