wgengine/router: move DNS cleanup into the DNS package.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-04-01 22:35:26 -07:00
parent 15875ccc63
commit f77ba75d6c
3 changed files with 17 additions and 9 deletions

View File

@@ -41,15 +41,6 @@ func New(logf logger.Logf, tundev tun.Device) (Router, error) {
// in case the Tailscale daemon terminated without closing the router.
// No other state needs to be instantiated before this runs.
func Cleanup(logf logger.Logf, interfaceName string) {
mconfig := dns.ManagerConfig{
Logf: logf,
InterfaceName: interfaceName,
Cleanup: true,
}
dns := dns.NewManager(mconfig)
if err := dns.Down(); err != nil {
logf("dns down: %v", err)
}
cleanup(logf, interfaceName)
}