wgengine/magicsock: skip sendDiscoPingsLocked when TS_DEBUG_NEVER_DIRECT_UDP (#20298)
Fixes #20101 Change-Id: I09dd8b6527857d4d05ed01ac3ac4183b6a6a6964 Signed-off-by: Alex Valiushko <alexvaliushko@tailscale.com>
This commit is contained in:
@@ -1362,8 +1362,12 @@ func (de *endpoint) startDiscoPingLocked(ep epAddr, now mono.Time, purpose disco
|
||||
|
||||
}
|
||||
|
||||
// sendDiscoPingsLocked starts pinging all of ep's endpoints.
|
||||
// sendDiscoPingsLocked starts pinging all of ep's direct endpoints.
|
||||
// Sibling of discoverUDPRelayPathsLocked for udprelay.
|
||||
func (de *endpoint) sendDiscoPingsLocked(now mono.Time, sendCallMeMaybe bool) {
|
||||
if debugNeverDirectUDP() {
|
||||
return // skip when direct UDP is disabled
|
||||
}
|
||||
de.lastFullPing = now
|
||||
var sentAny bool
|
||||
for ep, st := range de.endpointState {
|
||||
|
||||
Reference in New Issue
Block a user