]> git.ipfire.org Git - thirdparty/wireguard-go.git/commit
device: use atomic access for unlocked keypair.next
authorJason A. Donenfeld <Jason@zx2c4.com>
Sat, 2 May 2020 07:30:23 +0000 (01:30 -0600)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sat, 2 May 2020 07:56:48 +0000 (01:56 -0600)
commit28c4d043048e8bb7167e96df6558a6366306fc17
treec98e39cd6ed75e23f54e6d1b72b6f5c70fa9ab8a
parentfdba6c183aa8d4c19680f436517624038a6f3be5
device: use atomic access for unlocked keypair.next

Go's GC semantics might not always guarantee the safety of this, and the
race detector gets upset too, so instead we wrap this all in atomic
accessors.

Reported-by: David Anderson <danderson@tailscale.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
device/keypair.go
device/noise-protocol.go
device/noise_test.go
device/peer.go