aboutsummaryrefslogtreecommitdiffstats
path: root/tun/wintun/wintun_windows.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-04-13 01:58:53 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-04-13 02:02:02 +0200
commite0a8c22aa64d6a606cb03e3fd09eaa3e62a2f7c9 (patch)
tree1a1c1d8bd027367ae3efb23f88ef3333e5b5e689 /tun/wintun/wintun_windows.go
parentconn: linux: RTA_MARK has moved to x/sys (diff)
downloadwireguard-go-e0a8c22aa64d6a606cb03e3fd09eaa3e62a2f7c9.tar.xz
wireguard-go-e0a8c22aa64d6a606cb03e3fd09eaa3e62a2f7c9.zip
windows: use proper constants from updated x/sys
Diffstat (limited to '')
-rw-r--r--tun/wintun/wintun_windows.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/tun/wintun/wintun_windows.go b/tun/wintun/wintun_windows.go
index 8e09c41..eae283b 100644
--- a/tun/wintun/wintun_windows.go
+++ b/tun/wintun/wintun_windows.go
@@ -114,7 +114,7 @@ func GetInterface(ifname string, hwndParent uintptr) (*Wintun, error) {
// Get the device from the list. Should anything be wrong with this device, continue with next.
deviceData, err := devInfoList.EnumDeviceInfo(index)
if err != nil {
- if errWin, ok := err.(syscall.Errno); ok && errWin == 259 /*ERROR_NO_MORE_ITEMS*/ {
+ if errWin, ok := err.(syscall.Errno); ok && errWin == windows.ERROR_NO_MORE_ITEMS {
break
}
continue
@@ -145,7 +145,7 @@ func GetInterface(ifname string, hwndParent uintptr) (*Wintun, error) {
// Get a driver from the list.
driverData, err := devInfoList.EnumDriverInfo(deviceData, driverType, index)
if err != nil {
- if errWin, ok := err.(syscall.Errno); ok && errWin == 259 /*ERROR_NO_MORE_ITEMS*/ {
+ if errWin, ok := err.(syscall.Errno); ok && errWin == windows.ERROR_NO_MORE_ITEMS {
break
}
// Something is wrong with this driver. Skip it.
@@ -236,7 +236,7 @@ func CreateInterface(description string, hwndParent uintptr) (*Wintun, bool, err
// Get a driver from the list.
driverData, err := devInfoList.EnumDriverInfo(deviceData, driverType, index)
if err != nil {
- if errWin, ok := err.(syscall.Errno); ok && errWin == 259 /*ERROR_NO_MORE_ITEMS*/ {
+ if errWin, ok := err.(syscall.Errno); ok && errWin == windows.ERROR_NO_MORE_ITEMS {
break
}
// Something is wrong with this driver. Skip it.
@@ -364,7 +364,7 @@ func (wintun *Wintun) DeleteInterface(hwndParent uintptr) (bool, bool, error) {
// Get the device from the list. Should anything be wrong with this device, continue with next.
deviceData, err := devInfoList.EnumDeviceInfo(index)
if err != nil {
- if errWin, ok := err.(syscall.Errno); ok && errWin == 259 /*ERROR_NO_MORE_ITEMS*/ {
+ if errWin, ok := err.(syscall.Errno); ok && errWin == windows.ERROR_NO_MORE_ITEMS {
break
}
continue