]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
No need for padding any more
authorJason A. Donenfeld <Jason@zx2c4.com>
Mon, 14 May 2018 02:36:20 +0000 (04:36 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 14 May 2018 02:36:20 +0000 (04:36 +0200)
peer.go

diff --git a/peer.go b/peer.go
index 954c69c1a47e39a3e50987d41ba727661979a3d0..4bc1adafc421175b836d2a0eb31aac94e8dbb13b 100644 (file)
--- a/peer.go
+++ b/peer.go
@@ -25,8 +25,8 @@ type Peer struct {
        device                      *Device
        endpoint                    Endpoint
        persistentKeepaliveInterval uint16
-       _                           uint32 // padding for alignment
 
+       // This must be 64-bit aligned, so make sure the above members come out to even alignment and pad accordingly
        stats struct {
                txBytes           uint64 // bytes send to peer (endpoint)
                rxBytes           uint64 // bytes received from peer