From 7a8553aef00449867816fdbba54a02ae748eefca Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 10 May 2019 20:30:59 +0200 Subject: wintun: enumerate faster by using COMPATDRIVER instead of CLASSDRIVER --- tun/wintun/wintun_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tun/wintun') 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) -- cgit v1.2.3