mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
fix: change servertailnet to register the DERP dialer before setting DERP map (#12137)
I noticed a possible race where tailnet.Conn can try to dial the embedded region before we've set our custom dialer that send the DERP in-memory. This closes that race and adds a test case for servertailnet with no STUN and an embedded relay
This commit is contained in:
@ -204,7 +204,8 @@ func (c *configMaps) netMapLocked() *netmap.NetworkMap {
|
||||
nm.Addresses = make([]netip.Prefix, len(c.addresses))
|
||||
copy(nm.Addresses, c.addresses)
|
||||
|
||||
nm.DERPMap = c.derpMap.Clone()
|
||||
// we don't need to set the DERPMap in the network map because we separately
|
||||
// send the DERPMap directly via SetDERPMap
|
||||
nm.Peers = c.peerConfigLocked()
|
||||
nm.SelfNode.Addresses = nm.Addresses
|
||||
nm.SelfNode.AllowedIPs = nm.Addresses
|
||||
|
Reference in New Issue
Block a user