mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-07 08:07:42 +00:00
testcontrol: plumb through DERP
Without this tailscaled does not know the DERP of a peer. Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
This commit is contained in:
parent
ffd22050c0
commit
0b2761ca92
@ -579,6 +579,14 @@ func (s *Server) serveMap(w http.ResponseWriter, r *http.Request, mkey tailcfg.M
|
|||||||
endpoints := filterInvalidIPv6Endpoints(req.Endpoints)
|
endpoints := filterInvalidIPv6Endpoints(req.Endpoints)
|
||||||
node.Endpoints = endpoints
|
node.Endpoints = endpoints
|
||||||
node.DiscoKey = req.DiscoKey
|
node.DiscoKey = req.DiscoKey
|
||||||
|
if req.Hostinfo != nil {
|
||||||
|
node.Hostinfo = *req.Hostinfo.Clone()
|
||||||
|
if ni := node.Hostinfo.NetInfo; ni != nil {
|
||||||
|
if ni.PreferredDERP != 0 {
|
||||||
|
node.DERP = fmt.Sprintf("127.3.3.40:%d", ni.PreferredDERP)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
peersToUpdate = s.UpdateNode(node)
|
peersToUpdate = s.UpdateNode(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user