From c62b80e00b58599f85fe1fb215ca2474e4334c61 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 3 Jun 2020 05:42:57 +0000 Subject: [PATCH] cmd/tailscale: fix inverted flag meanings. The flags were --no-blah for a brief time, then we switched them to --blah=true/false with a default of true, but didn't fix the boolean inversions in the code. So up was down, true was false, etc. Signed-off-by: David Anderson --- cmd/tailscale/tailscale.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/tailscale/tailscale.go b/cmd/tailscale/tailscale.go index b1201e57f..ece75fee9 100644 --- a/cmd/tailscale/tailscale.go +++ b/cmd/tailscale/tailscale.go @@ -200,11 +200,11 @@ func runUp(ctx context.Context, args []string) error { prefs.ControlURL = upArgs.server prefs.WantRunning = true prefs.RouteAll = upArgs.acceptRoutes - prefs.AllowSingleHosts = !upArgs.singleRoutes + prefs.AllowSingleHosts = upArgs.singleRoutes prefs.ShieldsUp = upArgs.shieldsUp prefs.AdvertiseRoutes = routes prefs.AdvertiseTags = tags - prefs.NoSNAT = upArgs.snat + prefs.NoSNAT = !upArgs.snat prefs.DisableDERP = !upArgs.enableDERP if runtime.GOOS == "linux" { switch upArgs.netfilterMode {