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:
Alex Valiushko
2026-07-03 10:14:26 -07:00
committed by GitHub
parent b838d5caf7
commit 943b97e2f3
2 changed files with 43 additions and 1 deletions
+5 -1
View File
@@ -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 {