aboutsummaryrefslogtreecommitdiffstats
path: root/device/peer.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josh@tailscale.com>2020-12-14 15:28:52 -0800
committerJason A. Donenfeld <Jason@zx2c4.com>2021-01-07 14:49:44 +0100
commit63066ce4062a85224821ce302e3eb8c34e95a658 (patch)
treef6945216e1b48bc5404f612cdcc5564b12e93aae /device/peer.go
parentdevice: use channel close to shut down and drain encryption channel (diff)
downloadwireguard-go-63066ce4062a85224821ce302e3eb8c34e95a658.tar.xz
wireguard-go-63066ce4062a85224821ce302e3eb8c34e95a658.zip
device: fix persistent_keepalive_interval data races
Co-authored-by: David Anderson <danderson@tailscale.com> Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
Diffstat (limited to 'device/peer.go')
-rw-r--r--device/peer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/device/peer.go b/device/peer.go
index c2397cc..31b75c7 100644
--- a/device/peer.go
+++ b/device/peer.go
@@ -27,7 +27,7 @@ type Peer struct {
handshake Handshake
device *Device
endpoint conn.Endpoint
- persistentKeepaliveInterval uint16
+ persistentKeepaliveInterval uint32 // accessed atomically
disableRoaming bool
// These fields are accessed with atomic operations, which must be