]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
tun: windows: rearrange struct to avoid alignment trap on 32bit
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 7 May 2021 07:17:35 +0000 (09:17 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 7 May 2021 07:19:00 +0000 (09:19 +0200)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
tun/tun_windows.go

index 70f0aa3ab86dc7bea0ae402747e5842e587300f8..2305b72f7664ca4a76f93ae0be485e0f786d4cc4 100644 (file)
@@ -36,14 +36,14 @@ type rateJuggler struct {
 type NativeTun struct {
        wt        *wintun.Adapter
        handle    windows.Handle
-       close     bool
-       closing   sync.RWMutex
-       events    chan Event
-       forcedMTU int
        rate      rateJuggler
        session   wintun.Session
        readWait  windows.Handle
+       events    chan Event
+       closing   sync.RWMutex
        closeOnce sync.Once
+       forcedMTU int
+       close     bool
 }
 
 var WintunPool, _ = wintun.MakePool("WireGuard")