From 070d36d76d4d1c2caaf9715896912422a3760efe Mon Sep 17 00:00:00 2001 From: Denton Gentry Date: Tue, 25 Jul 2023 16:49:13 -0700 Subject: [PATCH] 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 --- cmd/tailscale/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/tailscale/main.go b/cmd/tailscale/main.go index f2780ef..7a2ce96 100644 --- a/cmd/tailscale/main.go +++ b/cmd/tailscale/main.go @@ -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) }