|
|
@ -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{})
|
|
|
|
}
|
|
|
|
}
|
|
|
|