mirror of
https://github.com/tailscale/tailscale.git
synced 2024-12-01 22:15:51 +00:00
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:
parent
61d0435ed9
commit
8ec44d0d5f
@ -2319,29 +2319,31 @@ func (c *Conn) SetNetworkMap(nm *netmap.NetworkMap) {
|
|||||||
}
|
}
|
||||||
ep.wgEndpoint = n.Key.UntypedHexString()
|
ep.wgEndpoint = n.Key.UntypedHexString()
|
||||||
ep.initFakeUDPAddr()
|
ep.initFakeUDPAddr()
|
||||||
c.logf("magicsock: created endpoint key=%s: disco=%s; %v", n.Key.ShortString(), n.DiscoKey.ShortString(), logger.ArgWriter(func(w *bufio.Writer) {
|
if debugDisco { // rather than making a new knob
|
||||||
const derpPrefix = "127.3.3.40:"
|
c.logf("magicsock: created endpoint key=%s: disco=%s; %v", n.Key.ShortString(), n.DiscoKey.ShortString(), logger.ArgWriter(func(w *bufio.Writer) {
|
||||||
if strings.HasPrefix(n.DERP, derpPrefix) {
|
const derpPrefix = "127.3.3.40:"
|
||||||
ipp, _ := netaddr.ParseIPPort(n.DERP)
|
if strings.HasPrefix(n.DERP, derpPrefix) {
|
||||||
regionID := int(ipp.Port())
|
ipp, _ := netaddr.ParseIPPort(n.DERP)
|
||||||
code := c.derpRegionCodeLocked(regionID)
|
regionID := int(ipp.Port())
|
||||||
if code != "" {
|
code := c.derpRegionCodeLocked(regionID)
|
||||||
code = "(" + code + ")"
|
if code != "" {
|
||||||
|
code = "(" + code + ")"
|
||||||
|
}
|
||||||
|
fmt.Fprintf(w, "derp=%v%s ", regionID, code)
|
||||||
}
|
}
|
||||||
fmt.Fprintf(w, "derp=%v%s ", regionID, code)
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, a := range n.AllowedIPs {
|
for _, a := range n.AllowedIPs {
|
||||||
if a.IsSingleIP() {
|
if a.IsSingleIP() {
|
||||||
fmt.Fprintf(w, "aip=%v ", a.IP())
|
fmt.Fprintf(w, "aip=%v ", a.IP())
|
||||||
} else {
|
} else {
|
||||||
fmt.Fprintf(w, "aip=%v ", a)
|
fmt.Fprintf(w, "aip=%v ", a)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
for _, ep := range n.Endpoints {
|
||||||
for _, ep := range n.Endpoints {
|
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{})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user