diff options
Diffstat (limited to 'control/controlbase')
| -rw-r--r-- | control/controlbase/conn.go | 2 | ||||
| -rw-r--r-- | control/controlbase/handshake.go | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/control/controlbase/conn.go b/control/controlbase/conn.go index 78ef73f71..8a3a90495 100644 --- a/control/controlbase/conn.go +++ b/control/controlbase/conn.go @@ -61,7 +61,7 @@ type rxState struct { // txState is all the Conn state that Write uses. type txState struct { - sync.Mutex + syncs.Mutex cipher cipher.AEAD nonce nonce err error // records the first partial write error for all future calls diff --git a/control/controlbase/handshake.go b/control/controlbase/handshake.go index 765a4620b..a57a3eca3 100644 --- a/control/controlbase/handshake.go +++ b/control/controlbase/handshake.go @@ -20,6 +20,7 @@ import ( chp "golang.org/x/crypto/chacha20poly1305" "golang.org/x/crypto/curve25519" "golang.org/x/crypto/hkdf" + "tailscale.com/syncs" "tailscale.com/types/key" ) @@ -186,6 +187,8 @@ func continueClientHandshake(ctx context.Context, conn net.Conn, s *symmetricSta cipher: c2, }, } + syncs.RegisterMutex(&c.rx.Mutex, "controlbase.Conn.rx.Mutex") + syncs.RegisterMutex(&c.tx.Mutex, "controlbase.Conn.tx.Mutex") return c, nil } |
