]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
wintun: enumerate faster by using COMPATDRIVER instead of CLASSDRIVER
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 10 May 2019 18:30:59 +0000 (20:30 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 10 May 2019 18:30:59 +0000 (20:30 +0200)
tun/wintun/wintun_windows.go

index 958a309333d1bacaa04776e71b0226b8f89f5beb..b48ff801b6b299b679f14c88ef313c170f4618a3 100644 (file)
@@ -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)