wgengine/magicsock: add extra logging for specific Mullvad node

Change-Id: I9ad9f669b8e8b3db42173c0c3d428207871ab8f7
This commit is contained in:
Andrew Dunham 2023-09-11 18:39:45 -04:00
parent 9209381a1b
commit cafdc3b303

View File

@ -234,7 +234,14 @@ func (de *endpoint) noteRecvActivity(ipp netip.AddrPort) {
de.bestAddr.AddrPort = ipp
de.bestAddrAt = now
de.trustBestAddrUntil = now.Add(5 * time.Second)
shouldLog := de.publicKey.ShortString() == "[TNrdH]"
de.mu.Unlock()
if shouldLog {
de.c.logf("noteRecvActivity: got activity from node [TNrdH]: %v", ipp)
}
}
elapsed := now.Sub(de.lastRecv.LoadAtomic())