cmd/tailscale/main.go: use ipn.NewPrefs(), not &ipn.Prefs{}

ipn.NewPrefs() sets accepting DNS and routes to true,
among other things. &ipn.Prefs{} initializes all fields
to false.

Fixes https://github.com/tailscale/corp/issues/13377

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
dns
Denton Gentry 10 months ago
parent 264aae3232
commit 070d36d76d

@ -357,7 +357,8 @@ func (a *App) runBackend() error {
}
first := state.Prefs == nil
if first {
state.Prefs = &ipn.Prefs{Hostname: a.hostname()}
state.Prefs = ipn.NewPrefs()
state.Prefs.Hostname = a.hostname()
go b.backend.SetPrefs(state.Prefs)
a.setPrefs(state.Prefs)
}

Loading…
Cancel
Save