summaryrefslogtreecommitdiffhomepage
path: root/control/controlhttp/controlhttpserver/controlhttpserver.go
diff options
context:
space:
mode:
authorSimon Law <sfllaw@sfllaw.ca>2025-03-18 15:46:57 -0700
committerAdrian Dewhurst <sailor@sailorfrag.net>2025-03-27 15:47:26 -0400
commite9324236e83e78e8fe588e38166d466a80aff150 (patch)
tree393eca7864051e1951eaac9c2f54ee15594d9e1e /control/controlhttp/controlhttpserver/controlhttpserver.go
parent7fc9099cf84d8d9ba4e4d6856511ed607507aa79 (diff)
downloadtailscale-e9324236e83e78e8fe588e38166d466a80aff150.tar.xz
tailscale-e9324236e83e78e8fe588e38166d466a80aff150.zip
cmd/tailscale: fix default for `tailscale set --accept-routes`
The default values for `tailscale up` and `tailscale set` are supposed to agree for all common flags. But they don’t for `--accept-routes` on Windows and from the Mac OS App Store, because `tailscale up` computes this value based on the operating system: user@host:~$ tailscale up --help 2>&1 | grep -A1 accept-routes --accept-dns, --accept-dns=false accept DNS configuration from the admin panel (default true) user@host:~$ tailscale set --help 2>&1 | grep -A1 accept-routes --accept-dns, --accept-dns=false accept DNS configuration from the admin panel Luckily, `tailscale set` uses `ipn.MaskedPrefs`, so the default values don’t logically matter. But someone will get the wrong idea if they trust the `tailscale set --help` documentation. In addition, `ipn.Prefs.RouteAll` defaults to true so it disagrees with both of the flags above. This patch makes `--accept-routes` use the same logic for in both commands by hoisting the logic that was buried in `cmd/tailscale/cli` to `ipn.Prefs.DefaultRouteAll`. Then, all three of defaults can agree. Fixes: #15319 Signed-off-by: Simon Law <sfllaw@sfllaw.ca>
Diffstat (limited to 'control/controlhttp/controlhttpserver/controlhttpserver.go')
0 files changed, 0 insertions, 0 deletions