wgengine/magicsock: remove some log spam

Fixes tailscale/corp#3070

Change-Id: Ie50031800ec8669e0596ad6d59d1e329a5c88516
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick 2021-11-18 10:51:34 -08:00 committed by Brad Fitzpatrick
parent 61d0435ed9
commit 8ec44d0d5f

View File

@ -2319,6 +2319,7 @@ func (c *Conn) SetNetworkMap(nm *netmap.NetworkMap) {
} }
ep.wgEndpoint = n.Key.UntypedHexString() ep.wgEndpoint = n.Key.UntypedHexString()
ep.initFakeUDPAddr() ep.initFakeUDPAddr()
if debugDisco { // rather than making a new knob
c.logf("magicsock: created endpoint key=%s: disco=%s; %v", n.Key.ShortString(), n.DiscoKey.ShortString(), logger.ArgWriter(func(w *bufio.Writer) { c.logf("magicsock: created endpoint key=%s: disco=%s; %v", n.Key.ShortString(), n.DiscoKey.ShortString(), logger.ArgWriter(func(w *bufio.Writer) {
const derpPrefix = "127.3.3.40:" const derpPrefix = "127.3.3.40:"
if strings.HasPrefix(n.DERP, derpPrefix) { if strings.HasPrefix(n.DERP, derpPrefix) {
@ -2342,6 +2343,7 @@ func (c *Conn) SetNetworkMap(nm *netmap.NetworkMap) {
fmt.Fprintf(w, "ep=%v ", ep) fmt.Fprintf(w, "ep=%v ", ep)
} }
})) }))
}
ep.updateFromNode(n) ep.updateFromNode(n)
c.peerMap.upsertEndpoint(ep, key.DiscoPublic{}) c.peerMap.upsertEndpoint(ep, key.DiscoPublic{})
} }