diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-04-18 06:54:21 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-04-18 06:54:21 +0200 |
commit | 099219be2a1e58b1b34b0202e1466480a4fa0cbc (patch) | |
tree | 8d51c6d7c843ff4294f3b53193f51a5239984928 | |
parent | 6cecaf31575d77d8f30be65a0a5d34055ee220a4 (diff) |
Align 64-bit atomics
64-bit varibles that are accessed using the Go atomic functions must be
8-byte aligned on 32-bit platforms. Otherwise there are crashes.
-rw-r--r-- | keypair.go | 2 | ||||
-rw-r--r-- | peer.go | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -14,10 +14,10 @@ import ( */ type KeyPair struct { + sendNonce uint64 send cipher.AEAD receive cipher.AEAD replayFilter ReplayFilter - sendNonce uint64 isInitiator bool created time.Time localIndex uint32 @@ -13,9 +13,9 @@ const ( ) type Peer struct { + persistentKeepaliveInterval uint64 isRunning AtomicBool mutex sync.RWMutex - persistentKeepaliveInterval uint64 keyPairs KeyPairs handshake Handshake device *Device |