summaryrefslogtreecommitdiffhomepage
path: root/tun/tun_windows.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-03-20 23:42:30 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2019-03-20 23:42:30 -0600
commitca59b60aa7767cd2ddd980d053e17ef29c52c0a3 (patch)
tree5c5785f31687497c3d0107f85585cb6eca5eb880 /tun/tun_windows.go
parentc050c6e60fc0207c063005e0cadded13195bd4c0 (diff)
tun: windows: use new constants in sys
Diffstat (limited to 'tun/tun_windows.go')
-rw-r--r--tun/tun_windows.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tun/tun_windows.go b/tun/tun_windows.go
index 15d9ae2..eca6738 100644
--- a/tun/tun_windows.go
+++ b/tun/tun_windows.go
@@ -115,7 +115,7 @@ func (tun *NativeTun) openTUN() error {
return errors.New("Cancelled")
}
- file, err := windows.CreateFile(tun.tunName, windows.GENERIC_READ|windows.GENERIC_WRITE, 0, nil, windows.OPEN_EXISTING, windows.FILE_ATTRIBUTE_NORMAL|windows.FILE_FLAG_OVERLAPPED|0x20000000 /*windows.FILE_FLAG_NO_BUFFERING*/, 0)
+ file, err := windows.CreateFile(tun.tunName, windows.GENERIC_READ|windows.GENERIC_WRITE, 0, nil, windows.OPEN_EXISTING, windows.FILE_ATTRIBUTE_NORMAL|windows.FILE_FLAG_OVERLAPPED|windows.FILE_FLAG_NO_BUFFERING, 0)
if err != nil {
if retries > 0 {
time.Sleep(time.Second / retryRate)