Commit Graph
10621 Commits
Author SHA1 Message Date
Mario Minardi 85c21219df tstest/natlab: add FreeBSD test case for SSH test
Add logic to generateFreeBSDUserData to allow for an SSH connection as
root for FreeBSD.

Add FreeBSD test cases to ssh_test that exercise the same paths as the
existing Ubuntu tests but for BSD.

Updates https://github.com/tailscale/corp/issues/44813
Updates https://github.com/tailscale/tailscale/issues/13038

Signed-off-by: Mario Minardi <[email protected]>
(cherry picked from commit 8bc4c09a46)
2026-07-27 17:26:45 -06:00
Brad Fitzpatrick f72e7dac25 tstest, cmd/tta: add Tailscale SSH end-to-end VM test
Add TestTailscaleSSH to tstest/natlab/vmtest, exercising the Tailscale
SSH server (tailscale up --ssh, not a system sshd) end to end: an
Ubuntu client node SSHes over the tailnet into an Ubuntu server node
as both root and a non-root user, and into a gokrazy node.

The gokrazy sessions exercise the gokrazy special cases in the SSH
code: util/osuser hard-codes the login shell to serial-busybox ash and
synthesizes a root user when lookup fails (so any username works and
becomes root, unlike Ubuntu where nonexistent users are rejected), and
the incubator's findSU refuses su on gokrazy, handling sessions
in-process.

To support this, testcontrol gains an SSHPolicy field that's sent in
MapResponses along with the CapabilitySSH node capability, tta's /up
handler accepts an ssh=true parameter, and vmtest gains a
TailscaleSSH node option that wires the two together with a
permissive any-principal policy.

Updates tailscale/corp#44813
Updates #13038

Signed-off-by: Brad Fitzpatrick <[email protected]>
Change-Id: I3f6b9c41a72e05d8c94dd7f6ab1937cf24b81c92
(cherry picked from commit c436dec43c)
2026-07-27 17:25:23 -06:00
Mike JensenandBrad Fitzpatrick 532ee02a0c Update tailscale/gliderssh to pull in tailscale/gliderssh#12 (#20486)
* Update tailscale/gliderssh to pull in tailscale/gliderssh#12

Updates tailscale/corp#41997

Change-Id: I5fb3d4705766deb71abd0b79a186e99e86be0b15
Signed-off-by: Mike Jensen <[email protected]>

* .github, tstest/natlab/vmtest: replace old VM runner job with natlab tests

The "vm" CI job ran a single test (TestRunUbuntu2404 from
tstest/integration/vms) on a privileged self-hosted runner. Its coverage
is nearly all redundant with the modern natlab vmtest suite, which boots
real Ubuntu VMs and already exercises connectivity, kernel TUN, SSH,
Taildrop, ACME, and OS DNS integration on GitHub-hosted runners.

The two things it tested that natlab didn't are added back as natlab
tests so the runner can be decommissioned:

TestUbuntuSystemdUnit runs tailscaled via the stock systemd unit that
Linux packages ship (cmd/tailscaled/tailscaled.service with
tailscaled.defaults as its EnvironmentFile) instead of launching the
binary directly, verifying the unit's directives and its Type=notify
readiness handshake.

TestDNSExtraRecordsSearchDomains verifies that control-plane DNS
ExtraRecords and search domains are resolvable through the guest's OS
resolver (libc to systemd-resolved to quad-100).

Updates #13038

Signed-off-by: Brad Fitzpatrick <[email protected]>
Change-Id: I8d0dfb8b8153289e7ca78f3af03dfece9497bfe8
(cherry picked from commit bef2cd8088)

---------

Signed-off-by: Mike Jensen <[email protected]>
Signed-off-by: Brad Fitzpatrick <[email protected]>
Co-authored-by: Brad Fitzpatrick <[email protected]>
2026-07-16 12:43:13 -06:00
Nick O'Neill 6c167d40fa VERSION.txt: this is v1.98.9
Signed-off-by: Nick O'Neill <[email protected]>
v1.98.9
2026-07-14 14:36:13 -07:00
Mario Minardi 84b13cdde5 util/osuser: reject leading dashes in usernames
Reject leading dashes in usernames and add double dash to getent call
on linux to prevent values sent as usernames being interpreted as
command options.

Fixes https://github.com/tailscale/corp/issues/44813

Signed-off-by: Mario Minardi <[email protected]>
(cherry picked from commit e4144230f4)
2026-07-14 13:18:54 -06:00
Patrick O'DohertyandKevinLiang10 69849dd40e ipn/ipnlocal: update getServeHandler path handling on malformed url (#20431) (#20441)
This commit updates the path matching logic in getServeHandler for malformed
request targets like "*" (e.g. "GET *") and "" (e.g. "CONNECT" authority-form).
Those paths never reduce to "/" as absolute path would. An absolute path check
was added and an additional check on no further reduce was added in the loop.

Fixes tailscale/corp#44814


(cherry picked from commit b803ba048c)

Signed-off-by: kevinliang10 <[email protected]>
Signed-off-by: Patrick O'Doherty <[email protected]>
Co-authored-by: KevinLiang10 <[email protected]>
2026-07-13 16:52:07 -07:00
Patrick O'Doherty 179c387d5f go.mod: bump Go to 1.26.5 (#20408) 2026-07-10 18:28:57 -07:00
Patrick O'DohertyandMario Minardi 81b7bc116e ssh/tailssh: dissallow purely numeric usernames for SSH (#20405)
Dissallow purely numeric usernames for SSH as these are ambiguous with
numeric UID values.

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


(cherry picked from commit f368a96e01)

Signed-off-by: Mario Minardi <[email protected]>
Signed-off-by: Patrick O'Doherty <[email protected]>
Co-authored-by: Mario Minardi <[email protected]>
2026-07-10 15:09:28 -07:00
Patrick O'DohertyandKevinLiang10 a2b3583d49 wgengine/netstack: reject unserved ports on Service (VIP) IPs (#20363) (#20402)
A connection to a Tailscale Service IP on a port the service does
not serve was forwarded to the underlying host. `acceptTCP` fell through to
the isTailscaleIP case (a VIP is in the Tailscale IP range), which rewrote
the dial target to 127.0.0.1:<port> and forwardTCP'd the connection onto
whatever unrelated listener happened to be on the host's loopback at that
port.

This is reachable through the service IP by any peer which was granted
access only to the service (dst: svc:foo), so it exposes host ports the
peer has no ACL access to via the machine's regular IP. This happens
when there tailscaled has a Tun interface and the forward bits are set.

In this commit, we added a guard in acceptTCP, before the isTailscaleIP case
that RSTs connections to a VIP service IP on a port with no serve handler.
Served ports return earlier via TCPHandlerForDst, so only unserved ports reach the guard.
Layer 3 services are unaffected: their traffic is released to the host in
injectInbound and never reaches acceptTCP.

Fixes #20362


(cherry picked from commit a68be19739)

Signed-off-by: kevinliang10 <[email protected]>
Signed-off-by: Patrick O'Doherty <[email protected]>
Co-authored-by: KevinLiang10 <[email protected]>
2026-07-10 13:44:29 -07:00
Patrick O'DohertyandHarry Harpham 84b382479c ipn,ipn/localapi: require local admin to serve Unix domain sockets (#20378)
This resolves a local privilege escalation (LPE). Prior to this change,
a non-admin user could utilize serve to access local Unix sockets they
otherwise should not be able to access. For example,

  tailscale serve --http 80 unix:/var/run/docker.sock

would give the user access to the Docker socket (usually root only).
This works because tailscaled has root access and implements the proxy
to the socket (see also: 'the confused deputy problem').

We resolve the problem by refusing to serve Unix targets altogether
unless instructed to by a root user.

Thanks to Tim Sageser (dtrsecurity) for this report.

Fixes tailscale/corp#41998


(cherry picked from commit fa542426e5)

Signed-off-by: Harry Harpham <[email protected]>
Co-authored-by: Harry Harpham <[email protected]>
2026-07-08 12:58:54 -07:00
Nick O'Neill 05a9182931 VERSION.txt: this is v1.98.8
Signed-off-by: Nick O'Neill <[email protected]>
v1.98.8
2026-06-23 15:22:41 -07:00
Jordan Whited b641062ac0 wgengine/magicsock: consider VNI as part of peer relay handshake suppression
Otherwise we may never handshake a new peer relay server endpoint
around remote client restarts and/or disco key rotation.

Updates #20215

Signed-off-by: Jordan Whited <[email protected]>
(cherry picked from commit badd0c4f93)
2026-06-23 13:26:22 -07:00
Nick O'Neill fa4f1d457a VERSION.txt: this is v1.98.7
Signed-off-by: Nick O'Neill <[email protected]>
v1.98.7
2026-06-22 15:49:52 -07:00
Alex Valiushko d4208877b6 go.mod: bump wireguard-go (#20202)
Fix leaking peers that failed to complete the handshake.

Updates #20183

Change-Id: I6b968aa41057c752f6181661da7f6b616a6a6964
Signed-off-by: Alex Valiushko <[email protected]>
2026-06-22 11:27:25 -07:00
Gesa Stupperich f1884a0acf sessionrecording: close idle connections after upload
If we don't close the connection between SSH server and recorder
explicitly once it's idle after the upload stream is closed, the
connection stays open and holds on to a port on the server. This
leads to port exhaustion on the server in the medium to long run.

To avoid this, close the idle connections explicitly. As an extra
step of precaution, set an idleConnTimeout of 30 seconds on both
the HTTP1 and HTTP2 recorder clients.

Updates tailscale/corp#43742

Signed-off-by: Gesa Stupperich <[email protected]>
2026-06-22 16:13:01 +01:00
Nick O'Neill 7e87f0d39b VERSION.txt this is v1.98.6
Signed-off-by: Nick O'Neill <[email protected]>
v1.98.6
2026-06-18 15:56:06 -07:00
Raj SinghandDoug Bryant b1ad740eb6 net/netmon: skip RTM_MISS route messages on darwin (#20050) (#20182)
macOS 26.4 emits RTM_MISS on the routing socket for every failed route
lookup. skipRouteMessage never inspected the message type, so each miss
woke the monitor as a link change and triggered a netcheck. On networks
without an IPv6 default route the netcheck's IPv6 DERP probes fail and
emit more RTM_MISS messages, sustaining the loop indefinitely: netchecks
run at roughly 40x the intended rate, with sustained probe traffic and
corresponding CPU and battery cost.

RTM_MISS scales with traffic volume, not network state, and is never
the leading signal for a topology change: route withdrawals emit
RTM_DELETE synchronously before any subsequent lookup can miss, so
ignoring it loses no signal. Other routing daemons (bird, dhcpcd, frr)
ignore it as well.

Same fix as coder/tailscale@e956a95074.

Fixes #19324


(cherry picked from commit 2767100bc2)

Signed-off-by: Doug Bryant <[email protected]>
Co-authored-by: Doug Bryant <[email protected]>
2026-06-18 17:42:53 -05:00
Jordan Whited 09b70550d9 wgengine/magicsock: suppress TSMP disco advert when bestAddr is peer relay
Updates #20156

Signed-off-by: Jordan Whited <[email protected]>
(cherry picked from commit 54005752a5)
2026-06-18 12:30:40 -07:00
Alex Valiushko 6f267a737d go.mod,wgengine/magicsock: pull wireguard-go fix for roaming endpoints (#20118)
Bumps wireguard-go pin to include the roaming endpoints fix, and
two internal enhancements.

Pulls stock wireguard-go for non-tailscale simulation in tests,
to use its endpoint discovery mechanism.

This is primarily cherry picked from 7d18a06, it differs only in
wireguard-go commit.

tailscale/wireguard-go@c32c33ada7 immediately follows
tailscale/wireguard-go@e3ac4a0afb

Updates #20082

Change-Id: I2ff282cb7fe4ab099ce5e780a1d40ae86a6a6964
Signed-off-by: Alex Valiushko <[email protected]>
(cherry picked from commit 7d18a06292)
2026-06-18 10:10:32 -07:00
Jordan Whited e43b5b6a35 control/controlknobs,wgengine/magicsock: disable TSMP disco advert if netmap caching is disabled
Updates #20081

Signed-off-by: Jordan Whited <[email protected]>
(cherry picked from commit be2f554dd3)
2026-06-18 10:09:49 -07:00
Patrick O'Doherty a98b177b31 ssh/tailssh: reject dangerous LD_/DYLD_ env vars in acceptEnv filtering (#19914) (#19949)
Block dynamic linker environment variables (LD_PRELOAD, LD_LIBRARY_PATH,
DYLD_INSERT_LIBRARIES, and friends) from being forwarded regardless of
acceptEnv policy, preventing privilege escalation via wildcard patterns
like "*".

We are not aware of any legitimate use of these variables so they are
safe to exclude from being passed.

Thanks to Tim Sageser (dtrsecurity) for this report.

Updates tailscale/corp#42033

(cherry picked from commit 651049ec19)

Signed-off-by: Patrick O'Doherty <[email protected]>
2026-06-01 10:19:21 -07:00
Jonathan Nobels 295179bf29 VERSION.txt: this is 1.98.5
Signed-off-by: Jonathan Nobels <[email protected]>
v1.98.5
2026-05-29 13:11:41 -04:00
Nick O'Neill 01c6b9661c VERSION.txt: this is v1.98.4
Signed-off-by: Nick O'Neill <[email protected]>
v1.98.4
2026-05-28 12:16:35 -07:00
Claus LensbølandAmal Bansode a85a4acce0 control/controlclient: fix deadlock in map session change queue processing (#19828) (#19904)
Holding an exclusive lock while writing to the unbuffered changequeue chan
is likely going to deadlock when the run() path may try to grab the same lock
before reading from the chan to drain it (on map session close). This causes
the client to stop processing new map responses and TSMP disco key advertisements.

There is a good probability of inducing this deadlock using the old code and new
test added in this commit: TestUpdateDiscoForNodeCallback/test_deadlock.

Also fix an unintentional regression in how the client responds to a mapResponse sleep
command. 85bb5f84a5 moved the processing of mapResponses into a new goroutine,
serialized via mapSession's changequeue. Thus, controlclient stopped sleeping in the
same goroutine servicing mapResponses/control connections. This commit brings us back
to sleeping synchronously in the same goroutine as controlclient.

Updates #12639




(cherry picked from commit e32b9bde1d)

Signed-off-by: Amal Bansode <[email protected]>
Signed-off-by: Claus Lensbøl <[email protected]>
Co-authored-by: Amal Bansode <[email protected]>
2026-05-28 10:37:31 -04:00
5f390d4845 cmd/containerboot: clamp MSS to PMTU for proxy group pods (#19686) (#19900)
Single-pod ingress/egress proxies already called ClampMSSToPMTU when
setting up forwarding rules, but the proxy group (HA) code paths in
egressservices.go and ingressservices.go did not. This caused TCP
connections through proxy group pods to suffer from MSS/MTU mismatch
issues in environments where path MTU discovery is not working.

Add ClampMSSToPMTU calls in the egress sync loop (alongside the existing
EnsureSNATForDst call) and in addDNATRuleForSvc (alongside the existing
EnsureDNATRuleForSvc call), mirroring what the single-pod forwarding
rules already do.

Also add MSS clamping assertions to TestSyncIngressConfigs and track
ClampMSSToPMTU calls in FakeNetfilterRunner.

Fixes issue #19812 https://github.com/tailscale/tailscale/issues/19812.
Tracking internal ticket TSS-86326.




(cherry picked from commit 4b8115bb2c)

Signed-off-by: Jay Tung <[email protected]>
Co-authored-by: dragondscv <[email protected]>
Co-authored-by: Jay Tung <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
2026-05-28 13:22:46 +01:00
David BondandArtem Leshchev 49d7ad38b3 cmd/k8s-operator: fix token exchange for identity federation (#19845) (#19897)
tailscale-client-go-v2 natively supports identity federation authentication,
and in #19010 the required authentication provider is used, but the manual
token exchange was never removed, so we were exchanging JWT token to an auth
token, and then were trying to use that auth token for exchange once again.
This commit removes the legacy mechanism, fully relying on
tailscale-client-go-v2 to handle authentication.

Fixes #19844


(cherry picked from commit 5652b6c9c0)

Signed-off-by: Artem Leshchev <[email protected]>
Co-authored-by: Artem Leshchev <[email protected]>
2026-05-28 10:37:12 +01:00
Jonathan Nobels 8f2c8d6a14 VERSION.txt: this is 1.98.3
Signed-off-by: Jonathan Nobels <[email protected]>
v1.98.3
2026-05-21 14:27:19 -04:00
Fernando Serboncini 666f0d2820 wgengine/router/osrouter: skip netfilter add-ons when chain setup fails (#19761)
linuxRouter has two blocks (connmark rules and the CGNAT drop rule) that
gate on cfg.NetfilterMode, the requested config state. This may cause an
error when setNetfilterModeLocked fails, since it may keep assuming this
config is valid.

We now gate both blocks on r.netfilterMode, matching the pattern used by
SNAT, stateful, and loopback paths.

Fixes #19737

Change-Id: Ia6003a082db99c376e662132d725661afbac0ee9

(cherry picked from commit 20b814893b)

Signed-off-by: Fernando Serboncini <[email protected]>
2026-05-15 09:34:44 -04:00
Jonathan Nobels 34c530668c VERSION.txt: this is 1.98.2 (#19751)
Signed-off-by: Jonathan Nobels <[email protected]>
v1.98.2
2026-05-14 11:22:47 -04:00
Fernando Serboncini b192880cb4 cmd/cloner: preserve nil-valued entries when cloning map (#19749)
The codegen path for map-of-slice-of-pointer fields, skipped
nil-valued entries. That dropped the key from the map.

This broke how dns.Config.Routes uses nil values sentinels.

Fixes #19730
Fixes #19732
Fixes #19746
Fixes #19744

Change-Id: Ic6400227f4ab21b3ca0e8c0eeecf9b83d145a9ab

Signed-off-by: Fernando Serboncini <[email protected]>
(cherry picked from commit 2a06fb66d0)
2026-05-14 10:37:18 -04:00
Brad Fitzpatrick f13500e12f go.toolchain.rev: bump to Go 1.26.3
Updates tailscale/corp#41490

Change-Id: I35b67bdbcd71468fea03b033b17aeefe1319dc45
Signed-off-by: Brad Fitzpatrick <[email protected]>
(cherry picked from commit 24eb157448)
2026-05-07 16:27:14 -07:00
Jonathan Nobels 87ab41993e VERSION.txt: this is v1.98.1
Signed-off-by: Jonathan Nobels <[email protected]>
v1.98.1
2026-05-07 15:31:26 -04:00
Brad Fitzpatrick bdcb71a0d0 tsnet: make workload identity federation opt-in
The tailscale.com/wif package brings in the AWS SDK
(github.com/aws/aws-sdk-go-v2/{config,sts,...} and github.com/aws/smithy-go)
to support fetching ID tokens from AWS IMDS for workload identity
federation. Until now, tsnet pulled this in unconditionally via
feature/condregister/identityfederation, costing ~70 unwanted deps for
every tsnet program whether or not it uses workload identity federation.

These AWS SDK deps were originally removed from tsnet on 2025-09-29 by
commit 69c79cb9f ("ipn/store, feature/condregister: move AWS + Kube
store registration to condregister"). They were then accidentally added
back on 2026-01-14 by commit 6a6aa805d ("cmd,feature: add identity
token auto generation for workload identity", PR #18373) when the new
wif package was wired into tsnet via feature/identityfederation.

Drop the blanket import. tsnet programs that want workload identity
federation now opt in with:

    import _ "tailscale.com/feature/identityfederation"

The hook lookup in resolveAuthKey already uses GetOk and degrades
gracefully when the feature isn't linked, so existing programs that
don't use workload identity federation see no behavior change. The
tailscale CLI still imports the condregister wrapper directly, so its
behavior is also unchanged.

Lock this in with TestDeps additions: tailscale.com/wif as a BadDep,
plus substring checks in OnDep that fail on any github.com/aws/ or
k8s.io/ dependency creeping back in.

Also, switch cmd/gitops-pusher from the condregister wrapper to a
direct import of feature/identityfederation: gitops-pusher's auth flow
calls HookExchangeJWTForTokenViaWIF directly, so it shouldn't be
subject to the ts_omit_identityfederation build tag.

Updates #12614

Change-Id: I70599f2bdd4d3666b26a859d5b76caa5d6b94507
Signed-off-by: Brad Fitzpatrick <[email protected]>
(cherry picked from commit 87a74c3aa2)
2026-05-07 08:24:14 -07:00
Brad Fitzpatrick 06a48f503d tsnet: ban awsstore and kubestore as deps in TestDeps
Commit 69c79cb9f (Sep 2025) moved awsstore and kubestore registration
behind condregister build tags so tsnet wouldn't pull in the AWS SDK
and Kubernetes client by default. The accompanying TestDeps BadDeps
entry was missed, so PR #19667 (which re-added those imports) wasn't
caught by the test.

Add the two packages to BadDeps so future regressions fail the test.

Updates #19667
Updates #12614

Change-Id: I903b7c976e5e122cc0c0b956dc73740f5d474fac
Signed-off-by: Brad Fitzpatrick <[email protected]>
(cherry picked from commit 15bb10dbce)
2026-05-07 08:24:12 -07:00
Jonathan Nobels f2d5ef72bd VERSION.txt: this is v1.98.0
Signed-off-by: Jonathan Nobels <[email protected]>
v1.98.0
2026-05-05 14:47:22 -04:00
Evan Lowry aa21b0c008 client/systray: fix recommended exit node not showing as selected (#19627)
When an exit node was set before launching systray, the recommended row
in exit nodes rendered as not selected even when the active exit node
was at the same location.

This looks to be two different things:

- suggestExitNode takes its own suggestion into account, and not the
  users active exit node. When a mullvad city is reached via the picker
  rather than the recommended row, the suggester's pick and
  prefs.ExitNodeID end up as distinct peers in the same city, resulting
  in an ID-only equality check missing the match.
- Toggle state was constructed and mutated via .Check(), which for newly
  created elements may be cached (such as when launching systray, with
  an already active node).

Fixes #19626

Signed-off-by: Evan Lowry <[email protected]>
2026-05-05 10:49:38 -03:00
Alex Chan eac531da8e cmd/tailscale/cli: unhide --report posture flag in up
This was originally hidden during the beta period in both `up` and `set`,
then when device posture went GA we unhid the flag in `set` but not in
`up`.

This is confusing for users, because an error message can direct them to
run `tailscale up` with this flag if they've set it previously, but the
help text won't tell them what it does.

Updates #5902
Updates #17972

Change-Id: I9a31946f4b3bb411feed0f5a6449d7ff9a5ba9d3
Signed-off-by: Alex Chan <[email protected]>
2026-05-05 10:12:36 +01:00
Brad Fitzpatrick 883d4fd2cd wgengine/netstack, net/ping: stop using pro-bing and use our net/ping instead
Fixes #19633
Fixes #13760

Change-Id: I0fa9423523a3a0fb1dfcde57de0f26e51723ff97
Signed-off-by: Brad Fitzpatrick <[email protected]>
2026-05-04 14:05:24 -07:00
Brad Fitzpatrick 81569e891f tstest/iosdeps: update import list to mirror ipn-go-bridge
The purpose of this package is to test the iOS dependency closure, but
it had drifted from the actual import list of the ipn-go-bridge package
in the corp repo (the Go side of the iOS / macOS app).

Update the imports to match ipn-go-bridge's GOOS=ios import list,
adding many missing packages including wgengine/netstack,
feature/{taildrop,syspolicy,condregister}, the util/syspolicy/*
subpackages, types/{key,lazy,logid,netmap}, tsd, safesocket,
util/{eventbus,must,set}, and several net/* and ipn/* packages.

Drop two now-stale BadDeps entries (for now!): database/sql/driver and
github.com/google/uuid are reached via wgengine/netstack ->
github.com/prometheus-community/pro-bing, which netstack imports on
darwin || ios for ICMP user-ping, so the iOS app already ships them.
But we should fix that later.

Updates #19633

Change-Id: Ic50779fdb195685a2e8ccd7c513eee91b0feeaf8
Signed-off-by: Brad Fitzpatrick <[email protected]>
2026-05-04 14:05:24 -07:00
Brad Fitzpatrick 9bb7ca6116 cmd/vet/lowerell, drive/driveimpl: forbid variables named "l" or "I"
Add a new vet checker that rejects variables, parameters, named
return values, receivers, range/type-switch bindings, type
parameters, struct fields, and constants named "l" (lowercase ell)
or "I" (uppercase i). Both are hard to distinguish from the digit
"1" and from each other in too many fonts.

Rename the two pre-existing struct fields named "l" (both of type
net.Listener) in drive/driveimpl/drive_test.go to "ln", matching the
convention used elsewhere for net.Listener locals.

Rename the test-fixture struct fields "I" (single int label) to
"Int" in metrics/multilabelmap_test.go and util/deephash/deephash_test.go,
preserving the "first letters of types" convention used alongside
neighboring fields like I8/I16/U/U8.

Also teach pkgdoc_test.go to skip testdata/ directories, which
the go tool ignores; they are not real packages.

Fixes #19631

Change-Id: I71ad2fa990705f7a070406ebcdb8cefa7487d849
Signed-off-by: Brad Fitzpatrick <[email protected]>
2026-05-04 14:03:28 -07:00
Andrew Lytvynov 0cf899610c util/linuxfw/linuxfwtest: remove unused package (#19520)
Added in 2022, this appears to be unused now.

Updates #cleanup

Signed-off-by: Andrew Lytvynov <[email protected]>
2026-05-04 12:33:12 -07:00
License Updater ca2317439d licenses: update license notices
Signed-off-by: License Updater <[email protected]>
2026-05-04 10:34:27 -07:00
Jordan Whited ce76f44df2 derp/derpserver: remove global rate limiter
Which can be unfair around varying packet sizes.

Updates tailscale/corp#40962

Signed-off-by: Jordan Whited <[email protected]>
2026-05-04 09:41:14 -07:00
Fernando Serboncini 29122506be misc/git_hook: propagate shared HOOK_VERSION (#19476)
Move HOOK_VERSION into the githook package and export it as
githook.HookVersion, so tailscale/corp can reference it via
the shared-code bump instead of having to bump HOOK_VERSION
by hand.

New launcher.sh composes the wanted version from 2 sources:
the shared HOOK_VERSION and an optional repo local version,
misc/git_hook/HOOK_VERSION, for repo-specific config bumps.

Updates tailscale/corp#40381

Change-Id: I7cf16889ba53cb564cc2df7dfd7588748f542c55

Signed-off-by: Fernando Serboncini <[email protected]>
2026-05-04 12:38:28 -04:00
George Jones 290a6cc03c appc, feature/conn25: handle exact and wildcard domains correctly (#19202)
Installed SplitDNS routes are always treated as wildcard domains,
so the domains that we pass to the local resolver should be normalized
and have any leading *. wildcard prefix removed.

When looking at DNS responses to see if the domain matches, we need to
consider both exact matches and wildcard matches. We now keep separate
maps of exact-match domains and wildcard domains, and when we match we
check to see if there's a match in the exact-match map, otherwise we
check against the wild card match map until we find a match, removing
a label after each check.

Rather than looking for matching self-hosted domains (domains serviced
by the connector being run on the self-node), the apps that are being
serviced by the connector on the self-node are tracked instead. When
checking to see if a DNS response should be rewritten, it is ignored
if any of the matching apps for the domain are in the self-hosted apps set.

Fixes tailscale/corp#39272

Signed-off-by: George Jones <[email protected]>
2026-05-01 17:33:21 -04:00
Fran Bull bdf3419e7d net/dns: add custom scheme resolvers
If another part of the client code registers a custom scheme with the
forwarder, the forwarder will check resolver addresses to see if they
match the scheme. If they do, the corresponding custom scheme handler
will be called to find the actual address for the resolver at this
moment. If the handler returns the empty string then that resolver will
be ignored.

This is useful if you want to dynamically determine where to send
certain DNS requests. It is being added to support new app connector
(conn25) work that would like to make sure it sends DNS requests to the
current connector peer in a high availability configuration.

Updates tailscale/corp#39858

Signed-off-by: Fran Bull <[email protected]>
2026-05-01 14:01:10 -07:00
Rollie Ma 78126c5d9f tailcfg: add node capability for services in desktop clients (#19605)
Add a node capability to help determine if the desktop clients should
show services list/menu/section

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

Change-Id: Ie34b3362f921d710173b2a0dd190354352bb26f0

Signed-off-by: Rollie Ma <[email protected]>
2026-05-01 12:07:33 -07:00
Tom Meadows ee10f9881c cmd/k8s-operator: add authkey reissuing to recorder reconciler (#19556)
also fixes memory leak with authKeyReissuing map on ProxyGroup
reconciler authkey reissue.

Updates #19311

Signed-off-by: chaosinthecrd <[email protected]>
2026-05-01 18:26:55 +01:00
Alex Chan 3ced30b0b6 tka: clarify that this limit is on disablement *values* not *secrets*
Values get written into TKA state; secrets don't.

Updates #cleanup

Change-Id: Ief9831dcb1102f584a33b2e71b611b38ca463724
Signed-off-by: Alex Chan <[email protected]>
2026-05-01 18:25:39 +01:00
Andrew Lytvynov f15a4f4416 client/web: move API permission checks into handlers (#19576)
There are only a couple endpoints that check peer capabilities. Keeping
permission checks with the code that assumes they were performed, rather
than with the routing layer, feels easier to reason about.

Check that the caller is actually a peer and pass their capabilities via
a context value for handlers that want to check them.

Along with this, simplify the helper handler wrappers that are not
needed for most of the endpoints.

Updates #40851

Signed-off-by: Andrew Lytvynov <[email protected]>
2026-05-01 09:01:53 -07:00