Skip to content

Commit

Permalink
testcontrol: plumb through DERP
Browse files Browse the repository at this point in the history
Without this tailscaled does not know the DERP of a peer.

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
  • Loading branch information
crawshaw committed Aug 30, 2021
1 parent ffd2205 commit 0b2761c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tstest/integration/testcontrol/testcontrol.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,14 @@ func (s *Server) serveMap(w http.ResponseWriter, r *http.Request, mkey tailcfg.M
endpoints := filterInvalidIPv6Endpoints(req.Endpoints)
node.Endpoints = endpoints
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)
}

Expand Down

0 comments on commit 0b2761c

Please sign in to comment.