summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-10 20:30:59 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-10 20:30:59 +0200
commit7a8553aef00449867816fdbba54a02ae748eefca (patch)
tree36f73d830c7b7b394ed47342926911f8621ba091
parenta6045ac0423472d849f7a173da1703adf3e0c51d (diff)
wintun: enumerate faster by using COMPATDRIVER instead of CLASSDRIVER
-rw-r--r--tun/wintun/wintun_windows.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tun/wintun/wintun_windows.go b/tun/wintun/wintun_windows.go
index 958a309..b48ff80 100644
--- a/tun/wintun/wintun_windows.go
+++ b/tun/wintun/wintun_windows.go
@@ -217,7 +217,7 @@ func CreateInterface(description string, hwndParent uintptr) (*Wintun, bool, err
}
// Search for the driver.
- const driverType = setupapi.SPDIT_CLASSDRIVER
+ const driverType = setupapi.SPDIT_COMPATDRIVER
err = devInfoList.BuildDriverInfoList(deviceData, driverType) //TODO: This takes ~510ms
if err != nil {
return nil, false, fmt.Errorf("SetupDiBuildDriverInfoList failed: %v", err)