Skip to content

Commit

Permalink
device: align 64-bit atomic member in Device
Browse files Browse the repository at this point in the history
Signed-off-by: Jason A. Donenfeld <[email protected]>
  • Loading branch information
zx2c4 committed Nov 16, 2021
1 parent 9d699ba commit fc4f975
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions device/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,17 @@ type Device struct {
publicKey NoisePublicKey
}

rate struct {
underLoadUntil int64
limiter ratelimiter.Ratelimiter
}

peers struct {
sync.RWMutex // protects keyMap
keyMap map[NoisePublicKey]*Peer
}

// Keep this 8-byte aligned
rate struct {
underLoadUntil int64
limiter ratelimiter.Ratelimiter
}

allowedips AllowedIPs
indexTable IndexTable
cookieChecker CookieChecker
Expand Down

0 comments on commit fc4f975

Please sign in to comment.