From: Jason A. Donenfeld Date: Fri, 10 May 2019 18:30:59 +0000 (+0200) Subject: wintun: enumerate faster by using COMPATDRIVER instead of CLASSDRIVER X-Git-Tag: 0.0.20190517~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a8553aef00449867816fdbba54a02ae748eefca;p=thirdparty%2Fwireguard-go.git wintun: enumerate faster by using COMPATDRIVER instead of CLASSDRIVER --- 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)