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/ipn
Andrew Lytvynov e25f114916
ipn,cmd/tailscale/cli: support hierarchical MaskedPrefs (#10507)
Some fields if `ipn.Prefs` are structs. `ipn.MaskedPrefs` has a single
level of boolean `*Set` flags, which doesn't map well to nested structs
within `ipn.Prefs`.

Change `MaskedPrefs` and `ApplyEdits` to support `FooSet` struct fields
that map to a nested struct of `ipn.Prefs` like `AutoUpdates`. Each
struct field in `MaskedPrefs` is just a bundle of more `Set` bool fields
or other structs. This allows you to have a `Set` flag for any
arbitrarily-nested field of `ipn.Prefs`.

Also, make `ApplyEdits` match fields between `Prefs` and `MaskedPrefs`
by name instead of order, to make it a bit less finicky. It's probably
slower but `ipn.ApplyEdits` should not be in any hot path.

As a result, `AutoUpdate.Check` and `AutoUpdate.Apply` fields don't
clobber each other when set individually.

Updates #16247

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
12 months ago
..
conffile ipn/{conffile,ipnlocal}: start booting tailscaled from a config file w/ auth key 1 year ago
ipnauth ipn/ipnauth: improve the Windows token administrator check 1 year ago
ipnlocal ipn/ipnlocal, util/syspolicy: add auto update policy 12 months ago
ipnserver all: fix nilness issues 12 months ago
ipnstate ipn/ipnstate: add AllowedIPs to PeerStatus 1 year ago
localapi ipn/localapi: use clientupdate.CanAutoUpdate from serveUpdateCheck 12 months ago
policy ipn,tailconfig: clean up unreleased and removed app connector service 1 year ago
store cmd/k8s-operator,ipn/store/kubestore: patch secrets instead of updating 1 year ago
backend.go cmd/tailscale,ipn/ipnlocal: print debug component names 1 year ago
conf.go ipn,cmd/tailscale/cli: support hierarchical MaskedPrefs (#10507) 12 months ago
doc.go all: update copyright and license headers 2 years ago
fake_test.go all: update copyright and license headers 2 years ago
ipn_clone.go linuxfw,wgengine/route,ipn: add c2n and nodeattrs to control linux netfilter 12 months ago
ipn_test.go net/packet: split off checksum munging into different pkg 1 year ago
ipn_view.go linuxfw,wgengine/route,ipn: add c2n and nodeattrs to control linux netfilter 12 months ago
prefs.go ipn,cmd/tailscale/cli: support hierarchical MaskedPrefs (#10507) 12 months ago
prefs_test.go ipn,cmd/tailscale/cli: support hierarchical MaskedPrefs (#10507) 12 months ago
serve.go ipn/localapi: require local Windows admin to set serve path (#9969) 1 year ago
serve_test.go ipn/localapi: require local Windows admin to set serve path (#9969) 1 year ago
store.go taildrop: lazily perform full deletion scan after first taildrop use (#10137) 1 year ago
store_test.go ipn: avoid useless no-op WriteState calls 1 year ago