summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2023-01-01util/codegen: Remove year from copyright header.clonerDenton Gentry15-17/+29
Copyright notices in software are not supposed to update the year in the header. Because we have a CI check for `go generate`, we're failing CI until we go update all of the copyright headers in generated files to say 2023. Instead, relax the requirement to always have a year in the copyright header. Fixes https://github.com/tailscale/tailscale/issues/6865 Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2022-12-29licenses: update android licensesLicense Updater1-9/+8
Signed-off-by: License Updater <noreply@tailscale.com>
2022-12-24flake.nix: rename package to just "tailscale".David Anderson1-8/+8
There is no unstability inherent in this package, it's just unstable if you choose to import the flake at the main branch. Signed-off-by: David Anderson <danderson@tailscale.com>
2022-12-24cmd/printdep: support printing the toolchain SRI hash.David Anderson2-0/+10
Updates #6845. Signed-off-by: David Anderson <danderson@tailscale.com>
2022-12-24update-flake.sh: tooling to keep Nix SRI hashes in sync.David Anderson5-5/+34
Also fixes the Go toolchain SRI hash from a7f05c6bb0fed3f060435f0828625f705839d56d, it turns out I initialized the file with an SRI hash for an older toolchain version, and because of the unique way fixed-output derivations work in nix, nix didn't tell me about the mismatch because it just cache-hit on the older toolchain and moved on. Sigh. Updates #6845. Signed-off-by: David Anderson <danderson@tailscale.com>
2022-12-24cmd/nardump: Go tool to build Nix NARs and compute their hashes.Brad Fitzpatrick2-0/+192
Updates #6845. Signed-off-by: David Anderson <danderson@tailscale.com>
2022-12-24flake.nix: init to ship unstable tailscale packages.David Anderson5-47/+227
With this, you can import "github:tailscale/tailscale" as a nix flake, and get access to the "tailscale-unstable" package. Updates #6845. Signed-off-by: David Anderson <dave@natulte.net>
2022-12-24version: construct short hash in dev mode if GitCommit is given.David Anderson1-4/+5
Allows a dev built to provide GitCommit and have the short hash computed correctly, even if the Go embedded build info lacks a git commit. Signed-off-by: David Anderson <dave@natulte.net>
2022-12-24scripts/installer.sh: add SUSE Enterprise Server.Denton Gentry1-1/+1
Fixes https://github.com/tailscale/tailscale/issues/6840 Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2022-12-23licenses: update win/apple licensesLicense Updater1-1/+1
Signed-off-by: License Updater <noreply@tailscale.com>
2022-12-23wgengine/netstack: change netstack API to require LocalBackendClaire Wang5-63/+54
The macOS client was forgetting to call netstack.Impl.SetLocalBackend. Change the API so that it can't be started without one, eliminating this class of bug. Then update all the callers. Updates #6764 Change-Id: I2b3a4f31fdfd9fdbbbbfe25a42db0c505373562f Signed-off-by: Claire Wang <claire@tailscale.com> Co-authored-by: Brad Fitzpatrick <bradfitz@tailscale.com> Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-12-23ssh/tailssh: don't swallow process exit code in be-childBrad Fitzpatrick1-1/+14
Thanks to @nshalman and @Soypete for debugging! Updates #6054 Change-Id: I74550cc31f8a257b37351b8152634c768e1e0a8a Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-12-22licenses: update tailscale{,d} licensesLicense Updater1-2/+2
Signed-off-by: License Updater <noreply@tailscale.com>
2022-12-22licenses: update win/apple licensesLicense Updater2-3/+3
Signed-off-by: License Updater <noreply@tailscale.com>
2022-12-22wgengine/netstack: delete some dead code, old comment, use atomic int typesBrad Fitzpatrick2-13/+7
Noticed while looking at something else; #cleanup. Change-Id: Icde7749363014eab9bebe1dd80708f5491f933d1 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-12-21ipn/ipnlocal: maintain a proxy handler per backend (#6804)Anton Tolchanov2-17/+77
By default, `http.Transport` keeps idle connections open hoping to re-use them in the future. Combined with a separate transport per request in HTTP proxy this results in idle connection leak. Fixes #6773
2022-12-21wgengine/monitor: don't log unhandled RTM_{NEW,DEL}LINK messagesAndrew Dunham1-0/+4
These aren't handled, but it's not an error to get one. Fixes #6806 Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: I1fcb9032ac36420aa72a048bf26f58360b9461f9
2022-12-21wgengine/magicsock: add TS_DISCO_PONG_IPV4_DELAY knob to bias IPv6 pathsBrad Fitzpatrick1-1/+12
Fixes #6818 Change-Id: I71597a045c5b4117af69fba869cb616271c0dfe1 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-12-21envknob: add time.Duration knob supportBrad Fitzpatrick1-5/+42
Updates #6818 Change-Id: I9c8147c02fb514f9f6f1f272bdb0f974c8b3ccbb Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-12-20go.mod, etc: bump gvisorandig7-40/+29
Fixes #6554 Change-Id: Ia04ae37a47b67fa57091c9bfe1d45a1842589aa8 Signed-off-by: andig <cpuidle@gmx.de>
2022-12-20cmd/tailscale: fix "up" warning about netfilter-mode on SynologyBrad Fitzpatrick1-1/+9
Fixes #6811 Change-Id: Ia43723e6ebedc9b01729897cec271c462b16e9ae Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-12-20ssh/tailssh: fix typo in error messageBrad Fitzpatrick1-2/+2
"look up" is the verb. "lookup" is a noun. Change-Id: I81c99e12c236488690758fb5c121e7e4e1622a36 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-12-20wgengine/magicsock: avoid ReadBatch/WriteBatch on old Linux kernelsBrad Fitzpatrick1-0/+9
Fixes #6807 Change-Id: I161424ef8a7338e1941d5e43d72dc6529993a0e3 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-12-20net/dns: bump DNS-over-TCP size limit to 4kAndrew Dunham1-2/+2
We saw a few cases where we hit this limit; bumping to 4k seems relatively uncontroversial. Change-Id: I218fee3bc0d2fa5fde16eddc36497a73ebd7cbda Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
2022-12-19licenses: update tailscale{,d} licensesLicense Updater1-1/+1
Signed-off-by: License Updater <noreply@tailscale.com>
2022-12-19go.toolchain.rev: bump GoBrad Fitzpatrick1-1/+1
For: https://github.com/tailscale/go/commit/dc0ce6324d19b7539e8efebc64c94631615fd80a and https://github.com/tailscale/go/commit/2cf198bc8033bc473724d3a813cc66e01f2b1102 Updates #6792 Updates #6799 Change-Id: I58f022b5fb790e968938f90eb76e9dfdb74041fc Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-12-19go.mod: bump x/sys for linux/arm64 cpu SIGILL fixBrad Fitzpatrick2-3/+3
Bump to get https://github.com/golang/sys/commit/2204b6615fb84fc69a9e5d37b2d508ddf544dcea Updates #5793 Change-Id: I6ab78824047cb2c8d042f3f3bf47368ec6da5a34 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-12-19cmd/sync-containers: add a dry-run option.David Anderson1-6/+11
Updates tailscale/corp#8461 Signed-off-by: David Anderson <danderson@tailscale.com>
2022-12-19cmd/sync-containers: program to sync tags between container registries.David Anderson2-1/+175
Updates tailscale/corp#8461 Signed-off-by: David Anderson <danderson@tailscale.com>
2022-12-19licenses: update android licensesLicense Updater1-10/+10
Signed-off-by: License Updater <noreply@tailscale.com>
2022-12-19netstat, portlist: update Windows implementation to disambiguate svchost ↵Aaron Klotz4-84/+151
processes We change our invocations of GetExtendedTcpTable to request additional information about the "module" responsible for the port. In addition to pid, this output also includes sufficient metadata to enable Windows to resolve process names and disambiguate svchost processes. We store the OS-specific output in an OSMetadata field in netstat.Entry, which portlist may then use as necessary to actually resolve the process/module name. Signed-off-by: Aaron Klotz <aaron@tailscale.com>
2022-12-19cmd/tailscale/cli: hide Windows named pipe default name in flag helpBrad Fitzpatrick1-2/+9
It's long & distracting for how low value it is. Fixes #6766 Change-Id: I51364f25c0088d9e63deb9f692ba44031f12251b Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-12-19go.toolchain.rev: bump Go to 1.19.4Brad Fitzpatrick1-1/+1
Updates tailscale/go#36 Change-Id: I0b741c18ef0286b511a79ec39b1e91464c7ce77b Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-12-19ipn/ipnlocal: fix StatusWithoutPeers not populating parts of StatusBrad Fitzpatrick6-17/+69
Fixes #4311 Change-Id: Iaae0615148fa7154f4ef8f66b455e3a6c2fa9df3 Co-authored-by: Claire Wang <claire@tailscale.com> Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-12-19util/winutil: fix erroneous condition in implementation of getRegIntegerInternalAaron Klotz1-1/+1
We only want to log when err != registry.ErrNotExist. The condition was backward. Signed-off-by: Aaron Klotz <aaron@tailscale.com>
2022-12-19licenses: update tailscale{,d} licensesLicense Updater1-1/+1
Signed-off-by: License Updater <noreply@tailscale.com>
2022-12-19go.mod: bump tailscale/wireguard-go for big-endian fix (#6785)Jordan Whited3-4/+3
Signed-off-by: Jordan Whited <jordan@tailscale.com>
2022-12-16cmd/containerboot: allow disabling secret storage in k8s.David Anderson2-10/+39
In some configurations, user explicitly do not want to store tailscale state in k8s secrets, because doing that leads to some annoying permission issues with sidecar containers. With this change, TS_KUBE_SECRET="" and TS_STATE_DIR=/foo will force storage to file when running in kubernetes. Fixes #6704. Signed-off-by: David Anderson <danderson@tailscale.com>
2022-12-16licenses: update win/apple licensesLicense Updater2-6/+6
Signed-off-by: License Updater <noreply@tailscale.com>
2022-12-16net/connstats: enforce maximum number of connections (#6760)Joe Tsai6-106/+206
The Tailscale logging service has a hard limit on the maximum log message size that can be accepted. We want to ensure that netlog messages never exceed this limit otherwise a client cannot transmit logs. Move the goroutine for periodically dumping netlog messages from wgengine/netlog to net/connstats. This allows net/connstats to manage when it dumps messages, either based on time or by size. Updates tailscale/corp#8427 Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2022-12-15ssh/tailssh: add envknob for default PATHBrad Fitzpatrick2-9/+49
As backup plan, just in case the earlier fix's logic wasn't correct and we want to experiment in the field or have users have a quicker fix. Updates #5285 Change-Id: I7447466374d11f8f609de6dfbc4d9a944770826d Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-12-15licenses: update tailscale{,d} licensesLicense Updater1-2/+2
Signed-off-by: License Updater <noreply@tailscale.com>
2022-12-15go.mod: bump dhcp dep to remove another endian package from our treeBrad Fitzpatrick3-9/+6
To pull in insomniacslk/dhcp#484 to pull in u-root/uio#8 Updates golang/go#57237 Change-Id: I1e56656e0dc9ec0b870f799fe3bc18b3caac1ee4 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-12-15licenses: update tailscale{,d} licensesLicense Updater1-9/+11
Signed-off-by: License Updater <noreply@tailscale.com>
2022-12-15licenses: update win/apple licensesLicense Updater1-1/+1
Signed-off-by: License Updater <noreply@tailscale.com>
2022-12-15ipn/ipnserver: propagate http.Serve errorAnton Tolchanov1-0/+1
This ensures that we capture error returned by `Serve` and exit with a non-zero exit code if it happens. Signed-off-by: Anton Tolchanov <anton@tailscale.com>
2022-12-14cmd/k8s-operator: move the operator into its own namespace.David Anderson2-12/+33
The operator creates a fair bit of internal cluster state to manage proxying, dumping it all in the default namespace is handy for development but rude for production. Updates #502 Signed-off-by: David Anderson <danderson@tailscale.com>
2022-12-14ssh/tailssh: set default Tailscale SSH $PATH for non-interactive commandsBrad Fitzpatrick2-2/+112
Fixes #5285 Co-authored-by: Andrew Dunham <andrew@tailscale.com> Change-Id: Ic7e967bf6a53b056cac5f21dd39565d9c31563af Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-12-14util/multierr: optimize New for nil cases (#6750)Joe Tsai2-13/+43
Consider the following pattern: err1 := foo() err2 := bar() err3 := baz() return multierr.New(err1, err2, err3) If err1, err2, and err3 are all nil, then multierr.New should not allocate. Thus, modify the logic of New to count the number of distinct error values and allocate the exactly needed slice. This also speeds up non-empty error situation since repeatedly growing with append is slow. Performance: name old time/op new time/op delta Empty-24 41.8ns ± 2% 6.4ns ± 1% -84.73% (p=0.000 n=10+10) NonEmpty-24 120ns ± 3% 69ns ± 1% -42.01% (p=0.000 n=9+10) name old alloc/op new alloc/op delta Empty-24 64.0B ± 0% 0.0B -100.00% (p=0.000 n=10+10) NonEmpty-24 168B ± 0% 88B ± 0% -47.62% (p=0.000 n=10+10) name old allocs/op new allocs/op delta Empty-24 1.00 ± 0% 0.00 -100.00% (p=0.000 n=10+10) NonEmpty-24 3.00 ± 0% 2.00 ± 0% -33.33% (p=0.000 n=10+10) Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2022-12-14net/tstun: don't return early from a partial tun.Read() (#6745)Jordan Whited1-4/+5
Fixes #6730 Signed-off-by: Jordan Whited <jordan@tailscale.com>