tun: windows: rearrange struct to avoid alignment trap on 32bit

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2021-05-07 09:17:35 +02:00
parent a7aec4449f
commit db733ccd65

View file

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