File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -44,15 +44,8 @@ type NativeTun struct {
4444 readWait windows.Handle
4545}
4646
47- var WintunPool * wintun.Pool
48-
49- func init () {
50- var err error
51- WintunPool , err = wintun .MakePool ("WireGuard" )
52- if err != nil {
53- panic (fmt .Errorf ("Failed to make pool: %w" , err ))
54- }
55- }
47+ var WintunPool , _ = wintun .MakePool ("WireGuard" )
48+ var WintunStaticRequestedGUID * windows.GUID
5649
5750//go:linkname procyield runtime.procyield
5851func procyield (cycles uint32 )
@@ -65,7 +58,7 @@ func nanotime() int64
6558// interface with the same name exist, it is reused.
6659//
6760func CreateTUN (ifname string , mtu int ) (Device , error ) {
68- return CreateTUNWithRequestedGUID (ifname , nil , mtu )
61+ return CreateTUNWithRequestedGUID (ifname , WintunStaticRequestedGUID , mtu )
6962}
7063
7164//
You can’t perform that action at this time.
0 commit comments