mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-22 02:50:42 +00:00
control/controlclient: fix data race on tkaHead (#16855)
Grab a copy under mutex in sendMapRequest. Updates #cleanup Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
This commit is contained in:
@@ -856,6 +856,7 @@ func (c *Direct) sendMapRequest(ctx context.Context, isStreaming bool, nu Netmap
|
||||
hi := c.hostInfoLocked()
|
||||
backendLogID := hi.BackendLogID
|
||||
connectionHandleForTest := c.connectionHandleForTest
|
||||
tkaHead := c.tkaHead
|
||||
var epStrs []string
|
||||
var eps []netip.AddrPort
|
||||
var epTypes []tailcfg.EndpointType
|
||||
@@ -906,7 +907,7 @@ func (c *Direct) sendMapRequest(ctx context.Context, isStreaming bool, nu Netmap
|
||||
Hostinfo: hi,
|
||||
DebugFlags: c.debugFlags,
|
||||
OmitPeers: nu == nil,
|
||||
TKAHead: c.tkaHead,
|
||||
TKAHead: tkaHead,
|
||||
ConnectionHandleForTest: connectionHandleForTest,
|
||||
}
|
||||
var extraDebugFlags []string
|
||||
|
Reference in New Issue
Block a user