aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-08-24 15:43:43 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-08-24 18:43:48 +0200
commit69b8b302afc413e612215397696bfaff76542cc8 (patch)
treefda2b17419fb718c41f250e5e65fd4f49e016bf3 /tunnel
parenttunnel: move Run into own module to reduce file size (diff)
downloadwireguard-windows-69b8b302afc413e612215397696bfaff76542cc8.tar.xz
wireguard-windows-69b8b302afc413e612215397696bfaff76542cc8.zip
version: use upstream RtlGetVersion
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--tunnel/firewall/rules.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/tunnel/firewall/rules.go b/tunnel/firewall/rules.go
index 1216065b..08dfce50 100644
--- a/tunnel/firewall/rules.go
+++ b/tunnel/firewall/rules.go
@@ -13,7 +13,6 @@ import (
"unsafe"
"golang.org/x/sys/windows"
- "golang.zx2c4.com/wireguard/windows/version"
)
//
@@ -829,12 +828,9 @@ func permitHyperV(session uintptr, baseObjects *baseObjects, weight uint8) error
// Only applicable on Win8+.
//
{
- v, err := version.OsVersion()
- if err != nil {
- panic(err)
- }
-
- win8plus := v.MajorVersion > 6 || (v.MajorVersion == 6 && v.MinorVersion >= 3)
+ //TODO: use RtlGetNtVersionNumbers instead when that's merged.
+ versionInfo := windows.RtlGetVersion()
+ win8plus := versionInfo.MajorVersion > 6 || (versionInfo.MajorVersion == 6 && versionInfo.MinorVersion >= 3)
if !win8plus {
return nil