You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/cmd
Brad Fitzpatrick 5190435d6e cmd/tailscale: rewrite the "up" checker, fix bugs
The old way was way too fragile and had felt like it had more special
cases than normal cases. (see #1874, #1860, #1834, etc) It became very
obvious the old algorithm didn't work when we made the output be
pretty and try to show the user the command they need to run in
5ecc7c7200 for #1746)

The new algorithm is to map the prefs (current and new) back to flags
and then compare flags. This nicely handles the OS-specific flags and
the n:1 and 1:n flag:pref cases.

No change in the existing already-massive test suite, except some ordering
differences (the missing items are now sorted), but some new tests are
added for behavior that was broken before. In particular, it now:

* preserves non-pref boolean flags set to false, and preserves exit
  node IPs (mapping them back from the ExitNodeID pref, as well as
  ExitNodeIP),

* doesn't ignore --advertise-exit-node when doing an EditPrefs call
  (#1880)

* doesn't lose the --operator on the non-EditPrefs paths (e.g. with
  --force-reauth, or when the backend was not in state Running).

Fixes #1880

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
4 years ago
..
cloner all: adjust Unix permissions for those without umasks 4 years ago
derper cmd/derper: add /bootstrap-dns handler 4 years ago
hello client/tailscale/apitype: move local API types to new apitype package 4 years ago
microproxy cmd/microproxy: add -insecure flag 4 years ago
mkpkg cmd/mkpkg: support adding empty directories. 5 years ago
tailscale cmd/tailscale: rewrite the "up" checker, fix bugs 4 years ago
tailscaled all: use lower-case letters at the start of error message 4 years ago
tsshd net/interfaces: return all Tailscale addresses from Tailscale(). 4 years ago