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!)
This commit is contained in:
David Crawshaw 2020-12-21 16:18:11 -05:00 committed by David Crawshaw
parent 15c064f76f
commit b4f70d8232

View File

@ -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,
}
}