Commit Graph

10155 Commits

Author SHA1 Message Date
David Bond
a341eea00b k8s-operator,cmd/k8s-operator: define ProxyGroupPolicy CRD (#18614)
This commit adds a new custom resource definition to the kubernetes
operator named `ProxyGroupPolicy`. This resource is namespace scoped
and is used as an allow list for which `ProxyGroup` resources can be
used within its namespace.

The `spec` contains two fields, `ingress` and `egress`. These should
contain the names of `ProxyGroup` resources to denote which can be
used as values in the `tailscale.com/proxy-group` annotation within
`Service` and `Ingress` resources.

The intention is for these policies to be merged within a namespace and
produce a `ValidatingAdmissionPolicy` and `ValidatingAdmissionPolicyBinding`
for both ingress and egress that prevents users from using names of
`ProxyGroup` resources in those annotations.

Closes: https://github.com/tailscale/corp/issues/36829

Signed-off-by: David Bond <davidsbond93@gmail.com>
2026-02-13 16:04:34 +00:00
Brad Fitzpatrick
d468870310 .github/workflows: bump oss-fuzz builder hash
Fixes #18710

Change-Id: I2ebad48b1227321233172beb9801087963ece4fa
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-02-12 14:25:17 -08:00
Brad Fitzpatrick
068074c109 portlist: also tb.Skip benchmarks (not just tests) on bad Linux kernels
Updates #16966

Change-Id: I0269927bdf8e6c4e949fcf755ce7e5fd21386d7d
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-02-12 13:19:09 -08:00
Will Hannah
36d359e585 clientupdate, cmd/tailscale/cli: support updating to release-candidates (#18632)
Adds a new track for release candidates. Supports querying by track in
version and updating to RCs in update for supported platforms.

updates #18193

Signed-off-by: Will Hannah <willh@tailscale.com>
2026-02-12 14:49:52 -05:00
Michael Ben-Ami
0bac4223d1 tstun: add test for intercept ordering
Fixes tailscale/corp#36999

Signed-off-by: Michael Ben-Ami <mzb@tailscale.com>
2026-02-11 16:48:19 -05:00
Harry Harpham
84ee5b640b testcontrol: send updates for new DNS records or app capabilities
Two methods were recently added to the testcontrol.Server type:
AddDNSRecords and SetGlobalAppCaps. These two methods should trigger
netmap updates for all nodes connected to the Server instance, the way
that other state-change methods do (see SetNodeCapMap, for example).

This will also allow us to get rid of Server.ForceNetmapUpdate, which
was a band-aid fix to force the netmap updates which should have been
triggered by the aforementioned methods.

Fixes tailscale/corp#37102

Signed-off-by: Harry Harpham <harry@tailscale.com>
2026-02-11 11:49:15 -07:00
Fernando Serboncini
73d09316e2 tstest: update clock to always use UTC (#18663)
Instead of relying on the local timezone, which may cause
non-deterministic behavior in some CIs, we force timezone
to be UTC on default created clocks.

Fixes: tailscale/corp#37005

Signed-off-by: Fernando Serboncini <fserb@tailscale.com>
2026-02-11 13:47:48 -05:00
Anton Tolchanov
45db3691b9 prober: export a metric with the number of in-flight probes
Updates tailscale/corp#37049

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
2026-02-11 14:25:15 +00:00
Brad Fitzpatrick
8e39a0aa0f go.toolchain.next.rev: update to final Go 1.26.0 [next]
This updates the TS_GO_NEXT=1 (testing) toolchain to Go 1.26.0

The default one is still Go 1.25.x.

Updates #18682

Change-Id: I99747798c166ce162ee9eee74baa9ff6744a62f6
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-02-10 20:44:30 -08:00
Simon Law
12188c0ade ipn/ipnlocal: log traffic steering scores and suggested exit nodes (#18681)
When traffic steering is enabled, some users are suggested an exit
node that is inappropriately far from their location. This seems to
happen right when the client connects to the control plane and the
client eventually fixes itself. But whenever an affected client
reconnects, its suggested exit node flaps, and this happens often
enough to be noticeable because connections drop whenever the exit
node is switched. This should not happen, since the map response that
contains the list of suggested exit nodes that the client picks from,
also contains the scores for those nodes.

Since our current logging and diagnostic tools don’t give us enough
insight into what is happening, this PR adds additional logging when:
- traffic steering scores are used to suggest an exit node
- an exit node is suggested, no matter how it was determined

Updates: tailscale/corp#29964
Updates: tailscale/corp#36446

Signed-off-by: Simon Law <sfllaw@tailscale.com>
2026-02-10 18:14:32 -08:00
License Updater
1172b2febd licenses: update license notices
Signed-off-by: License Updater <noreply+license-updater@tailscale.com>
2026-02-10 17:16:07 -08:00
James Scott
6cbfc2f3ba logtail/filch: fix filch test panic (#18660)
Updates rotateLocked so that we hold the activeStderrWriteForTest write
lock around the dup2Stderr call, rather than acquiring it only after
dup2 was already compelete.  This ensures no stderrWriteForTest calls
can race with the dup2 syscall. The now unused waitIdleStderrForTest has
been removed.

On macOS, dup2 and write on the same file descriptor are not atomic with
respect to each other, when rotateLocked called dup2Stderr to redirect
the stderr fd to a new file, concurrent goroutines calling
stderrWriteForTest could observe the fd in a transiently invalid state,
resulting in the bad file descripter.

Fixes tailscale/corp#36953

Signed-off-by: James Scott <jim@tailscale.com>
2026-02-10 13:24:00 -08:00
Brad Fitzpatrick
dc1d811d48 magicsock, ipnlocal: revert eventbus-based node/filter updates, remove Synchronize hack
Restore synchronous method calls from LocalBackend to magicsock.Conn
for node views, filter, and delta mutations. The eventbus delivery
introduced in 8e6f63cf1 was invalid for these updates because
subsequent operations in the same call chain depend on magicsock
already having the current state. The Synchronize/settleEventBus
workaround was fragile and kept requiring more workarounds and
introducing new mystery bugs.

Since eventbus was added, we've since learned more about when to use
eventbus, and this wasn't one of the cases.

We can take another swing at using eventbus for netmap changes in a
future change.

Fixes #16369
Updates #18575 (likely fixes)

Change-Id: I79057cc9259993368bb1e350ff0e073adf6b9a8f
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-02-10 07:32:05 -08:00
Jonathan Nobels
086968c15b net/dns, ipn/local: skip health warnings in dns forwarder when accept-dns is false (#18572)
fixes tailscale/tailscale#18436

Queries can still make their way to the forwarder when accept-dns is disabled.
Since we have not configured the forwarder if --accept-dns is false, this errors out
(correctly) but it also generates a persistent health warning.   This forwards the
Pref setting all the way through the stack to the forwarder so that we can be more
judicious about when we decide that the forward path is unintentionally missing, vs
simply not configured.

Testing:
tailscale set --accept-dns=false. (or from the GUI)
dig @100.100.100.100 example.com
tailscale status

No dns related health warnings should be surfaced.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2026-02-10 09:29:14 -05:00
BeckyPauley
e4008d1994 cmd/containerboot: fix error handling for egress (#18657)
Fixes #18631

Signed-off-by: Becky Pauley <becky@tailscale.com>
2026-02-10 10:19:06 +00:00
Aaron Klotz
770bf000de tool/gocross: replace use of Start-Process -Wait flag with WaitForExit
-Wait does not just wait for the created process; it waits for the
entire process tree rooted at that process! This can cause the shell
to wait indefinitely if something in that tree fired up any background
processes.

Instead we call WaitForExit on the returned process.

Updates https://github.com/tailscale/corp/issues/29940

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
2026-02-09 16:25:55 -07:00
Brad Fitzpatrick
d26d3fcb95 .github/workflows: add macos runner
Fixes #18118

Change-Id: I118fcc6537af9ccbdc7ce6b78134e8059b0b5ccf
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-02-09 15:09:19 -08:00
Michael Ben-Ami
5a5572e48a tstun,wgengine: add new datapath hooks for intercepting Connectors 2025
app connector packets

We introduce the Conn25PacketHooks interface to be used as a nil-able
field in userspaceEngine. The engine then plumbs through the functions
to the corresponding tstun.Wrapper intercepts.

The new intercepts run pre-filter when egressing toward WireGuard,
and post-filter when ingressing from WireGuard. This is preserve the
design invariant that the filter recognizes the traffic as interesting
app connector traffic.

This commit does not plumb through implementation of the interface, so
should be a functional no-op.

Fixes tailscale/corp#35985

Signed-off-by: Michael Ben-Ami <mzb@tailscale.com>
2026-02-09 17:06:27 -05:00
Amal Bansode
00e180cdd7 go.mod: update bart dep to v0.26.1 (#18659)
bart has gained a bunch of purported performance and usability
improvements since the current version we are using (0.18.0,
from 1y ago)

Updates tailscale/corp#36982

Signed-off-by: Amal Bansode <amal@tailscale.com>
2026-02-09 13:24:25 -08:00
faukah
fff623206e flake.nix: update NixOS wiki link (#18662)
wiki.nixos.org is and has been the official wiki for quite some time now.

Signed-off-by: faukah <fau@faukah.com>
2026-02-09 15:39:28 -05:00
Tim Walters
dfba01ca9b cmd/tailscaled: update documentation url
This updates the URL shown by systemd to the new URL used by the docs
after the recent migration.

Fixes #18646

Signed-off-by: Tim Walters <tim@tailscale.com>
2026-02-09 07:09:11 -05:00
Brad Fitzpatrick
a3215f1f9d cmd/tailscale,feature/featuretags: make webbrowser and colorable deps omittable
Add new "webbrowser" and "colorable" feature tags so that the
github.com/toqueteos/webbrowser and mattn/go-colorable packages
can be excluded from minbox builds.

Updates #12614

Change-Id: Iabd38b242f5a56aa10ef2050113785283f4e1fe8
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-02-08 10:04:04 -08:00
KevinLiang10
5eaaf9786b tailcfg: add peerRelay bool to hostinfo
This commit adds a bool named PeerRelay to Hostinfo, to identify the host's status of acting as a peer relay.
Considering the RelayServerPort number can be 0, I just made this a bool in stead of a port number. If the port
info is needed in future this would also help indicating if the port was set to 0 (meaning any port in peer relay
context).

Updates tailscale/corp#35862

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>
2026-02-06 18:25:40 -07:00
Andrew Lytvynov
9ba2a80ab6 go.toolchain.{rev,next.rev}: update to Go 1.25.7 / Go 1.26rc3 (#18633)
Updates #18629

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2026-02-06 12:54:11 -08:00
James Tucker
fe69b7f0e5 cmd/tailscale: add event bus queue depth debugging
Under extremely high load it appears we may have some retention issues
as a result of queue depth build up, but there is currently no direct
way to observe this. The scenario does not trigger the slow subscriber
log message, and the event stream debugging endpoint produces a
saturating volume of information.

Updates tailscale/corp#36904

Signed-off-by: James Tucker <james@tailscale.com>
2026-02-06 10:46:29 -08:00
Anton Tolchanov
35e656a35f tsweb/varz: remove unnecessary Map.Init() calls in tests
Updates #cleanup

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
2026-02-06 18:35:30 +00:00
Anton Tolchanov
826fd544cc tsweb/varz: only export numeric expvar.Map values
Currently the expvar exporter attempts to write expvar.String, which
breaks the Prometheus metric page.

Updates tailscale/corp#36552

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
2026-02-06 18:35:30 +00:00
James Tucker
de4a8dbcfc control/controlclient: fix canSkipStatus online conditions
concurrent netmaps that if the first is logged in, it is never skipped.
This should have been covered be the skip test case, but that case
wasn't updated to include level set state.

Updates #12639
Updates #17869

Signed-off-by: James Tucker <james@tailscale.com>
2026-02-06 10:20:48 -08:00
Brad Fitzpatrick
0c5b17c1d3 cmd/tailscale: don't depend on regexp in minbox builds
Updates #12614
Updates #18562

Change-Id: Ife4f10c55d1d68569938ffd68ffe72eef889e200
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-02-06 09:43:15 -08:00
Will Hannah
058cc3f82b ipn/ipnlocal: skip AuthKey use if profiles exist (#18619)
If any profiles exist and an Authkey is provided via syspolicy, the
AuthKey is ignored on backend start, preventing re-auth attempts. This
is useful for one-time device provisioning scenarios, skipping authKey
use after initial setup when the authKey may no longer be valid.

updates #18618

Signed-off-by: Will Hannah <willh@tailscale.com>
2026-02-06 09:40:55 -05:00
Mario Minardi
6587cafb3f cmd/tailscale: use advertise tags from prefs for OAuth and id federation
Use the parsed and validated advertise tags value from prefs instead of
doing a strings.Split on the raw tags value as an input to the OAuth and
identity federation auth key generation methods.

The previous strings.Split method would return an array with a single
empty string element which would pass downstream length checks on the
tags argument before eventually failing with a confusing message when
hitting the API.

Fixes https://github.com/tailscale/tailscale/issues/18617

Signed-off-by: Mario Minardi <mario@tailscale.com>
2026-02-05 12:50:48 -07:00
Brad Fitzpatrick
036b6a1262 feature/featuretags: add test that all ts_omit_foo tags are declared
Updates #12614

Change-Id: I49351fe0c463af0b8d940e8088d4748906a8aec3
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-02-04 13:15:41 -08:00
Fran Bull
642d1aaa60 cmd/tailscaled,feature/conn25,feature/featuretags: add conn25 to featuretags
Package feature/conn25 is excludeable from a build via the featuretag.
Test it is excluded for minimal builds.

Updates #12614

Signed-off-by: Fran Bull <fran@tailscale.com>
2026-02-04 12:52:08 -08:00
Brad Fitzpatrick
40cd54daf7 cmd/tailscale: remove dep on clientupdate package if feature is omitted
We already had a featuretag for clientupdate, but the CLI wasn't using
it, making the "minbox" build (minimal combined tailscaled + CLI
build) larger than necessary.

Updates #12614

Change-Id: Idd7546c67dece7078f25b8f2ae9886f58d599002
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-02-04 10:44:48 -08:00
James Tucker
569caefeb5 tsnet: add tests to TestListenService for user-supplied TUN devices
This resolves a gap in test coverage, ensuring Server.ListenService
functions as expected in combination with user-supplied TUN devices

Fixes tailscale/corp#36603

Co-authored-by: Harry Harpham <harry@tailscale.com>
Signed-off-by: Harry Harpham <harry@tailscale.com>
2026-02-04 07:21:37 -07:00
Fernando Serboncini
5edfa6f9a8 ipn/ipnlocal: add wildcard TLS certificate support for subdomains (#18356)
When the NodeAttrDNSSubdomainResolve capability is present, enable
wildcard certificate issuance to cover all single-level subdomains
of a node's CertDomain.

Without the capability, only exact CertDomain matches are allowed,
so node.ts.net yields a cert for node.ts.net. With the capability,
we now generate wildcard certificates. Wildcard certs include both
the wildcard and base domain in their SANs, and ACME authorization
requests both identifiers. The cert filenames are kept still based
on the base domain with the wildcard prefix stripped, so we aren't
creating separate files. DNS challenges still used the base domain

The checkCertDomain function is replaced by resolveCertDomain that
both validates and returns the appropriate cert domain to request.
Name validation is now moved earlier into GetCertPEMWithValidity()

Fixes #1196

Signed-off-by: Fernando Serboncini <fserb@tailscale.com>
2026-02-03 16:08:36 -05:00
Andrew Lytvynov
54d70c8312 clientupdate: best-effort restart of tailscaled on init.d systems (#18568)
Not all Linux distros use systemd yet, for example GL.iNet KVM devices
use busybox's init, which is similar to SysV init.
This is a best-effort restart attempt after the update, it probably
won't cover 100% of init.d setups out there.

Fixes #18567

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2026-02-03 12:57:05 -08:00
Brad Fitzpatrick
7b96c4c23e cmd/testwrapper: support experimental -cachelink
Updates tailscale/go#149

Change-Id: If0483466eb1fc2196838c75f6d53925b1809abff
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-02-03 09:10:07 -08:00
M. J. Fromberger
14322713a5 ipn/ipnlocal/netmapcache: ensure cache updates preserve unchanged data (#18590)
Found by @cmol. When rewriting the same value into the cache, we were dropping
the unchanged keys, resulting in the cache being pruned incorrectly.
Also update the tests to catch this.

Updates #12639

Change-Id: Iab67e444eb7ddc22ccc680baa2f6a741a00eb325
Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
2026-02-03 07:55:41 -08:00
Tom Meadows
77f5200164 cmd/k8s-operator,k8s-operator:ensure that recorder replicas default to 1 (#18375)
Updates #17965

Signed-off-by: chaosinthecrd <tom@tmlabs.co.uk>
2026-02-03 14:12:38 +00:00
David Bond
f2b4d7065d cmd/containerboot: handle v6 pod ips that are missing square brackets (#18519)
This commit fixes an issue within containerboot that arose from the
kubernetes operator. When users enable metrics on custom resources that
are running on dual stack or ipv6 only clusters, they end up with an error
as we pass the hostport combintation using $(POD_IP):PORT.

In go, `netip.ParseAddrPort` expects square brackets `[]` to wrap the host
portion of an ipv6 address and would naturally, crash.

When loading the containerboot configuration from the environment we now
check if the `TS_LOCAL_ADDR_PORT` value contains the pod's v6 ip address.
If it does & does not already contain brackets, we add the brackets in.

Closes: #15762
Closes: #15467

Signed-off-by: David Bond <davidsbond93@gmail.com>
2026-02-03 11:16:59 +00:00
Andrew Lytvynov
ae95d8d222 cmd/tailscale: fix sanitizeOutput and add a test (#18589)
Follow up from https://github.com/tailscale/tailscale/pull/18563 which I
totally botched.

Updates #18562

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2026-02-02 15:38:40 -08:00
Brad Fitzpatrick
8736fbb754 cmd/tailscale/cli: add 'wait' listening subcommand and ip --assert=<ip>
This provides a mechanism to block, waiting for Tailscale's IP to be
ready for a bind/listen, to gate the starting of other services.

It also adds a new --assert=[IP] option to "tailscale ip", for services
that want extra paranoia about what IP is in use, if they're worried about
having switched to the wrong tailnet prior to reboot or something.

Updates #3340
Updates #11504

... and many more, IIRC

Change-Id: I88ab19ac5fae58fd8c516065bab685e292395565
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-02-02 15:19:06 -08:00
Neal Gompa (ニール・ゴンパ)
abdbca47af client/systray: Update systemd unit to use correct dependencies (#18457)
This ensures that D-Bus is active for the unit and will correctly
shut down when the default target ends.

Fixes: https://github.com/tailscale/tailscale/issues/18458

Signed-off-by: Neal Gompa <ngompa@velocitylimitless.com>
2026-02-02 11:49:44 -05:00
Brad Fitzpatrick
274ab995d2 go.toolchain.*: bump our Go 1.25 and Go 1.26 toolchains
Go1.25 for tailscale/go#149
Go1.26 for tailscale/go#149 + upstream release-branch.go1.26 work since rc2.

Updates tailscale/go#149

Change-Id: Ib56b5b5119f181c4a81d4b599b8bbdb405ee6704
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-02-01 13:47:28 -08:00
Brendan Creane
8cac8b117b net/dns/resolver: set TC flag when UDP responses exceed size limits (#18157)
The forwarder was not setting the Truncated (TC) flag when UDP DNS
responses exceeded either the EDNS buffer size (if present) or the
RFC 1035 default 512-byte limit. This affected DoH, TCP fallback,
and UDP response paths.

The fix ensures checkResponseSizeAndSetTC is called in all code paths
that return UDP responses, enforcing both EDNS and default UDP size
limits.

Added comprehensive unit tests and consolidated duplicate test helpers.

Updates #18107

Signed-off-by: Brendan Creane <bcreane@gmail.com>
2026-01-30 17:52:54 -08:00
Mario Minardi
b4d39e2fd9 cmd/gitops-pusher: fix precedence when id token env var is empty
Fix precedence logic to skip federated identity logic when the
associated environment variables are empty.

Updates https://github.com/tailscale/gitops-acl-action/issues/71

Signed-off-by: Mario Minardi <mario@tailscale.com>
2026-01-30 17:37:11 -07:00
KevinLiang10
03461ea7fb wgengine/netstack: add local tailscale service IPs to route and terminate locally (#18461)
* wgengine/netstack: add local tailscale service IPs to route and terminate locally

This commit adds the tailscales service IPs served locally to OS routes, and
make interception to packets so that the traffic terminates locally without
making affects to the HA traffics.

Fixes tailscale/corp#34048

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>

* fix test

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>

* add ready field to avoid accessing lb before netstack starts

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>

* wgengine/netstack: store values from lb to avoid acquiring a lock

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>

* add active services to netstack on starts with stored prefs.

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>

* fix comments

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>

* update comments

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>

---------

Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>
2026-01-30 16:46:03 -05:00
Jordan Whited
3b6d542923 wgengine/magicsock: make debugNeverDirectUDP influence remote peer decisions
By dropping inbound disco.Ping messages received over direct UDP paths.

Fixes #18560

Signed-off-by: Jordan Whited <jordan@tailscale.com>
2026-01-30 13:16:46 -08:00
Brad Fitzpatrick
3ce13eb2b9 cmd/testwrapper: add support for the -vet test flag
So callers can run testwrapper with -vet=off if they're already
running vet explicitly in a concurrent test job.

Updates tailscale/corp#28679

Change-Id: I74ad56e560076d187f5e3a7d7381e1dac89d860c
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-01-30 12:49:05 -08:00