wgengine/router: don't store unused tunname on windows.

pull/1644/head
David Anderson 4 years ago
parent 6266cf8e36
commit 15875ccc63

@ -27,7 +27,6 @@ import (
type winRouter struct {
logf func(fmt string, args ...interface{})
tunname string
nativeTun *tun.NativeTun
routeChangeCallback *winipcfg.RouteChangeCallback
dns *dns.Manager
@ -44,11 +43,6 @@ type winRouter struct {
}
func newUserspaceRouter(logf logger.Logf, tundev tun.Device) (Router, error) {
tunname, err := tundev.Name()
if err != nil {
return nil, err
}
nativeTun := tundev.(*tun.NativeTun)
luid := winipcfg.LUID(nativeTun.LUID())
guid, err := luid.GUID()
@ -63,7 +57,6 @@ func newUserspaceRouter(logf logger.Logf, tundev tun.Device) (Router, error) {
return &winRouter{
logf: logf,
tunname: tunname,
nativeTun: nativeTun,
dns: dns.NewManager(mconfig),
firewall: &firewallTweaker{

Loading…
Cancel
Save