This was shifted by 2 bytes when making persistent keepalive into a u32.
Fix it by placing it after the aligned region.
Fixes: e739ff7 ("device: fix persistent_keepalive_interval data races")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
device *Device
endpoint conn.Endpoint
persistentKeepaliveInterval uint32 // accessed atomically
- disableRoaming bool
// These fields are accessed with atomic operations, which must be
// 64-bit aligned even on 32-bit platforms. Go guarantees that an
lastHandshakeNano int64 // nano seconds since epoch
}
+ disableRoaming bool
+
timers struct {
retransmitHandshake *Timer
sendKeepalive *Timer