wgengine/magicsock: make debug-level stuff not logged by default

And add a CLI/localapi and c2n mechanism to enable it for a fixed
amount of time.

Updates #1548

Change-Id: I71674aaf959a9c6761ff33bbf4a417ffd42195a7
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2022-10-03 20:39:45 -07:00
committed by Brad Fitzpatrick
parent 5c69961a57
commit 1841d0bf98
10 changed files with 241 additions and 21 deletions
+2 -2
View File
@@ -234,12 +234,12 @@ func (c *Conn) receiveDisco(pc net.PacketConn, isIPV6 bool) {
if acceptPort == 0 {
// This should only typically happen if the receiving address family
// was recently disabled.
c.logf("[v1] disco raw: dropping packet for port %d as acceptPort=0", dstPort)
c.dlogf("[v1] disco raw: dropping packet for port %d as acceptPort=0", dstPort)
continue
}
if dstPort != acceptPort {
c.logf("[v1] disco raw: dropping packet for port %d", dstPort)
c.dlogf("[v1] disco raw: dropping packet for port %d", dstPort)
continue
}