]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
tun: windows: use specific IOCTL code
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 19 Jul 2019 06:30:19 +0000 (08:30 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 19 Jul 2019 06:30:19 +0000 (08:30 +0200)
tun/tun_windows.go

index dff51dd4ad0d3f5fabe30e312ab0eedb20903768..5da5a70c91888de70610c26d1a0c5ac33981329c 100644 (file)
@@ -25,7 +25,7 @@ const (
        packetCapacity     uint32 = 0x800000 // Ring capacity, 8MiB
        packetTrailingSize uint32 = uint32(unsafe.Sizeof(packetHeader{})) + ((packetSizeMax + (packetAlignment - 1)) &^ (packetAlignment - 1)) - packetAlignment
 
-       ioctlRegisterRings uint32 = (0x22 /*FILE_DEVICE_UNKNOWN*/ << 16) | (0x800 << 2) | 0 /*METHOD_BUFFERED*/ | (0x3 /*FILE_READ_DATA | FILE_WRITE_DATA*/ << 14)
+       ioctlRegisterRings uint32 = (51820 << 16) | (0x970 << 2) | 0 /*METHOD_BUFFERED*/ | (0x3 /*FILE_READ_DATA | FILE_WRITE_DATA*/ << 14)
 
        retryRate    = 4  // Number of retries per second to reopen device pipe
        retryTimeout = 30 // Number of seconds to tolerate adapter unavailable