4488 Commits

Author SHA1 Message Date
Andrei Korviakov c90ba0f0d6 changelog: note the acmeLogger renewal fix 2026-09-15 14:37:20 +02:00
Andrei Korviakov 7472e98f6c hscontrol: keep the ACME error body readable in acmeLogger
acmeLogger drained and closed the body of every ACME error response before
handing the response back to golang.org/x/crypto/acme. The client parses that
body to classify errors, so badNonce was no longer recognised: isBadNonce
returned false, clearNonces was never called and Client.post treated the 400 as
non-retriable.

One badNonce reply therefore stops certificate renewal for good. autocert
retries every 30-60 minutes, each attempt reuses a nonce stored from the
previous failed response, that nonce has already expired, and the loop repeats
until the process is restarted or the certificate expires.

Restore the body with a fresh reader after logging it.
2026-09-15 14:37:20 +02:00
Florian Preinstorfer 4087d1fee9 Use tmpfs for /tmp
This is relevant when docker is used as container runtime as it does not
set /tmp as tmpfs. With podman /tmp is mounted as tmpfs due to
`--read-only-tmpfs` (enabled by default).

Fixes: #3463
2026-09-10 14:12:53 +02:00
Kristoffer Dalby f91702d7ec CHANGELOG: note the peer map reuse
Updates #3417
2026-09-10 13:06:13 +02:00
Kristoffer Dalby 4c6a2dff52 state: resolve changed peers through adjacency
ListPeers now filters named peers against the recipient's adjacency, so
a node the policy hides is never delivered.

Updates #3417
2026-09-10 13:06:13 +02:00
Kristoffer Dalby e3c4c81b18 state: reuse peer adjacency for payload-only writes
A write that cannot move visibility carries the previous adjacency
forward; policy and user changes rebuild it explicitly.

Updates #3417
2026-09-10 13:06:13 +02:00
Kristoffer Dalby 95ba787417 policy,state: key the peer map by node ID
Adjacency becomes immutable, so a snapshot can resolve peers through its
own fresh views instead of storing them.

Updates #3417
2026-09-10 13:06:13 +02:00
Kristoffer Dalby f9f31c5e08 CHANGELOG: note narrower map request handling
Updates #3417
2026-09-10 13:06:13 +02:00
Kristoffer Dalby 6a9f6c3bd7 integration: pin which Hostinfo changes reach peers
Updates #3417
2026-09-10 13:06:13 +02:00
Kristoffer Dalby 1b820b7ebe state: skip node health writes that change nothing
An all-unchanged probe cycle no longer publishes a snapshot.

Updates #3417
2026-09-10 13:06:13 +02:00
Kristoffer Dalby dfe0d3f2e5 state: stop broadcasting a whole peer on disconnect
Going offline changes nothing the policy reads, so the row write skips
the policy refresh and peers get only the offline patch.

Updates #3417
2026-09-10 13:06:13 +02:00
Kristoffer Dalby 59f3ff12a7 state: classify map requests before broadcasting
Each request is reduced to the narrowest change it justifies, so a
keepalive or endpoint bump no longer resends the whole node to peers.

Updates #3417
2026-09-10 13:06:13 +02:00
Kristoffer Dalby 286f1d5a12 mapper: drop empty changes before fan-out
An empty change carries no work for any recipient, so it never becomes
a pending entry. Adds headscale_mapper_changes_dropped_total.

Updates #3417
2026-09-10 13:06:13 +02:00
Kristoffer Dalby 905ab92fe0 types: detect policy change on user identity and exit routes
Updates #3417
2026-09-10 13:06:13 +02:00
Kristoffer Dalby be322e8ea7 policy,types: skip recompile when the user list is unchanged
SetUsers now also reports whether user-derived peer adjacency moved.

Updates #3417
2026-09-10 13:06:13 +02:00
Kristoffer Dalby 1bbe59b98d state: rename persist helpers to say what they do
Updates #3417
2026-09-10 13:06:13 +02:00
Kristoffer Dalby b10438d8f6 AGENTS.md: drop stale line numbers
Updates #3417
2026-09-10 13:06:13 +02:00
Kristoffer Dalby 67d018258b CHANGELOG: merge the duplicate 0.29.4 sections
Two 0.29.4 headings had appeared. Move the node deletion, OIDC reload and
OIDC callback hardening entries into it, since all three ship in 0.29.4.
2026-09-10 09:37:09 +02:00
Kristoffer Dalby 9c9686eacd CHANGELOG: note OIDC confirmation reload fix
Updates #3365
2026-09-09 19:01:43 +02:00
Kristoffer Dalby 10dd38fcef oidc: harden reloadable confirmation flow
Updates #3365
2026-09-09 19:01:43 +02:00
Sean Reifschneider 6d377b5348 oidc: serve the registration confirmation page from a reloadable URL
The interstitial was the body of /oidc/callback, the URL carrying the
single-use code, so any reload re-entered the spent exchange. Redirect to
GET /register/confirm/{auth_id}, also missing from the route table.
2026-09-09 19:01:43 +02:00
Kristoffer Dalby 475d3ae82c CHANGELOG: note the self-as-peer map fix 2026-09-09 18:18:53 +02:00
Kristoffer Dalby 8995d8a558 mapper: assert no map response lists the recipient as its own peer
Covers every change shape under four policy shapes, plus connect churn. The
zero-matcher shape is the gap: buildTailPeers skips ReduceNodes there, so the
peer lookup is the only self filter left.
2026-09-09 18:18:53 +02:00
Kristoffer Dalby d9aebf472d state: exclude self from peers on the named peer-ID path
ListPeers with explicit IDs filtered every node, not every peer, so a change
batch naming the recipient returned it as its own peer. db.ListPeers keeps
this out with `id <> nodeID`; the NodeStore rewrite dropped it.
2026-09-09 18:18:53 +02:00
Kristoffer Dalby 1d6e97c459 integration: cover deletion across client versions
Updates #3410
2026-09-09 18:18:17 +02:00
Kristoffer Dalby afb3020ef0 noise: make deleted-node expiry clock independent
Updates #3410
2026-09-09 18:18:17 +02:00
Kristoffer Dalby a91c0519c2 change, mapper: distinguish deleted nodes
Updates #3410
2026-09-09 18:18:17 +02:00
Kristoffer Dalby fc6a16fdfc state: preserve committed node deletion changes
Updates #3410
2026-09-09 18:18:17 +02:00
Kristoffer Dalby ef456542ce poll: interrupt blocked map writes
Updates #3410
2026-09-09 18:18:17 +02:00
Kristoffer Dalby 754327dd6b CHANGELOG: node deletion now ends the client's session
Updates #3410
2026-09-09 18:18:17 +02:00
Kristoffer Dalby cea9ebd105 .github/workflows: regenerate the integration test matrix
Updates #3410
2026-09-09 18:18:17 +02:00
Kristoffer Dalby 2cefb7ec06 integration: cover node deletion ending the long poll
A deleted node is served a self node with no StableID, so Status().Self.ID
goes empty; TestACLPolicyPropagationOverTime must match on hostname instead.

Updates #3410
2026-09-09 18:18:17 +02:00
Kristoffer Dalby b1fb6ed2e6 poll, noise: tell a deleted node to re-authenticate
A bare 404 is indistinguishable from any other map-path error to a Tailscale
client: it retries forever, still logged in. Only a self node with a past
KeyExpiry reaches NeedsLogin. Also skip the reconnect grace wait, which a
deleted node can never satisfy.

Fixes #3410
2026-09-09 18:18:17 +02:00
Kristoffer Dalby 42bf00523a types/change: drop unused VisibilityChange
It fills PeersRemoved without deleting anything. The batcher now tears down
the session behind every removed id, so a caller would kill a live poll.

Updates #3410
2026-09-09 18:18:17 +02:00
Kristoffer Dalby 0b69e844f5 mapper: stop a deleted node's map session
Dropping the batcher entry left serveLongPoll streaming to a node that no
longer exists: Close ranges b.nodes and can no longer reach it, so shutdown
blocks and the client keeps polling instead of re-authenticating.

Updates #3410
2026-09-09 18:18:17 +02:00
Saleh 95ba1f0566 types: lowercase DNS extra record names
DNS names are case-insensitive, but clients match extra records against
the lowercased query name, so records with mixed-case names (for example
"Printer.fritz.box" in an extra_records_path file) never resolved and
queries fell through to the global nameserver.

Normalize record names to lowercase where the records enter the tailcfg
DNS config, covering both dns.extra_records and extra_records_path.

Fixes #2782
2026-09-09 12:09:52 +02:00
Florian Preinstorfer 38722e5eeb Document automatic exit node selection and related node attributes
- Add "Automatic exit node selection" to route docs
- Add suggest-exit-node and suggest-exit-node-ui as supported nodeAttrs

Fixes: #3444
2026-09-08 10:32:27 +02:00
Florian Preinstorfer febe3ee341 Document how to disable remote client logging on mobile 2026-09-08 10:32:27 +02:00
Kristoffer Dalby 5f955cb4b4 CHANGELOG: add 0.29.4 section
Fixes backported to release-branch/0.29 had nowhere to go, so the users
rename entry opened a stray Fixes heading under 0.30.0. Add the 0.29.4
section and move the backported entries into it. Drop an empty link the
pre-commit and nix prettier disagree on.
2026-09-04 17:16:00 +02:00
Kristoffer Dalby f3f6c98220 integration: build tailscale HEAD images with Go 1.27.1
Tailscale main now requires go >= 1.27.1, breaking the image build and
skipping the whole integration matrix.
2026-09-04 15:19:37 +02:00
Lukas Runge 0af4081444 docs: link the PR from the users rename changelog entry 2026-09-04 11:37:56 +02:00
Lukas Runge beecdf0dbf cli: fix lint findings in the users rename test
Address golangci-lint findings in users_test.go: replace inline
"if err := ...; err != nil" statements with plain assignments
(noinlineerr) and add blank lines between statements in the fake
server's filter loop and before an early return (wsl_v5).
2026-09-04 11:37:56 +02:00
Lukas Runge f790af27be docs: clarify the users rename changelog entry 2026-09-04 11:37:56 +02:00
Lukas Runge 52ec985dda docs: note the users rename fix in the changelog 2026-09-04 11:37:56 +02:00
Lukas Runge 41e49462c4 cli: fix users rename when resolved by name
resolveSingleUser returned the raw --identifier flag value instead of
the identifier of the matched user. Renaming with --name therefore sent
OldId=0 to the API and failed with "user not found". Return the matched
user's identifier and pass it straight to the rename endpoint.
2026-09-04 11:37:56 +02:00
Sebastien Tardif acb9fafded CHANGELOG: link extra-records filewatcher fix to #3437
Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
2026-09-04 11:35:45 +02:00
Sebastien Tardif a48a42baf4 dns: cancel extra-records retry on shutdown and close watcher on setup error
After Remove/Rename, the extra-records filewatcher retried with
context.Background and the default 15-minute backoff budget, so Close
could not stop Run. Cancel that retry when closeCh closes. If the file
is still missing after the budget, watch the parent directory so a later
recreate is seen.

Close the fsnotify watcher on NewExtraRecordsManager error paths after
NewWatcher succeeds.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
2026-09-04 11:35:45 +02:00
Igor Serganov c26b2fd0a4 linting issue fix 2026-09-04 11:33:48 +02:00
Igor Serganov a9f80d8802 hscontrol: cancel tailsql on graceful shutdown
Serve stored a Background context for tailsql and called
context.Done() during signal shutdown. Done only returns the
done channel and does not cancel, so tailsql never stopped
when Headscale shut down.

Create a cancellable child of the Serve context, run
`runTailSQLService` in the listener errgroup so its error is
surfaced, and call the cancel func on shutdown - tailsql
unblocks on ctx.Done.
2026-09-04 11:33:48 +02:00
Lukas Wolfsteiner 89fa72e08f docs: add repository star count and activity badges to web UI list 2026-09-02 13:33:22 +02:00