wgengine: move DNS configuration out of wgengine/router.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-04-02 19:24:02 -07:00
committed by Dave Anderson
parent 7183e1f052
commit 4c61ebacf4
15 changed files with 38 additions and 71 deletions

View File

@@ -350,6 +350,13 @@ func tryEngine(logf logger.Logf, linkMon *monitor.Mon, name string) (e wgengine.
return nil, false, err
}
conf.Router = r
tunname, err := dev.Name()
if err != nil {
r.Close()
dev.Close()
return nil, false, err
}
conf.DNS = dns.NewOSConfigurator(logf, tunname)
}
e, err = wgengine.NewUserspaceEngine(logf, conf)
if err != nil {