From b4f70d82328b8cb7d49a24f0bdec9f38f3e511d9 Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Mon, 21 Dec 2020 16:18:11 -0500 Subject: [PATCH] wgengine/router/dns: use the correct interface GUID On Win10, there's a hardcoded GUID and this works. On Win7, this GUID changes and we need to ask the tun for its LUID and convert that from the GUID. This commit uses the computed GUID that is placed in InterfaceName. Diagnosed by Jason Donnenfeld. (Thanks!) --- wgengine/router/dns/manager_windows.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wgengine/router/dns/manager_windows.go b/wgengine/router/dns/manager_windows.go index 718f5ecbe..2af53795e 100644 --- a/wgengine/router/dns/manager_windows.go +++ b/wgengine/router/dns/manager_windows.go @@ -11,7 +11,6 @@ "syscall" "time" - "github.com/tailscale/wireguard-go/tun" "golang.org/x/sys/windows/registry" "tailscale.com/types/logger" ) @@ -30,7 +29,7 @@ type windowsManager struct { func newManager(mconfig ManagerConfig) managerImpl { return windowsManager{ logf: mconfig.Logf, - guid: tun.WintunGUID, + guid: mconfig.InterfaceName, } }