Skip to content

Commit 4e1d83e

Browse files
committed
CHANGELOG: document hostname cleanroom rewrite
Summarise the ingest rewrite, the SaaS-matching collision rule, and the BREAKING change from random-suffix to numeric-suffix collision labels and from "invalid-<rand>" to the literal "node" fallback. Updates #3188
1 parent d6dfdc1 commit 4e1d83e

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,46 @@ addresses, including those outside the tailnet. This replaces the old behaviour
4141
all IPs (see BREAKING below). The name is intentionally scary: accepting traffic from the entire
4242
internet is a security-sensitive choice. `autogroup:danger-all` can only be used as a source.
4343

44+
### Hostname handling (cleanroom rewrite)
45+
46+
The hostname ingest pipeline has been rewritten to match Tailscale SaaS byte-for-byte.
47+
Headscale previously had three overlapping regexes and two disagreeing entry points
48+
(registration vs map-request update), which caused a recurring class of bugs: names
49+
containing apostrophes, spaces, dots, or non-ASCII characters were alternately rejected
50+
(dropping updates with log spam) or stored as `invalid-<rand>` surrogates
51+
([#3188](https://github.com/juanfont/headscale/issues/3188),
52+
[#2926](https://github.com/juanfont/headscale/issues/2926),
53+
[#2343](https://github.com/juanfont/headscale/issues/2343),
54+
[#2762](https://github.com/juanfont/headscale/issues/2762),
55+
[#2177](https://github.com/juanfont/headscale/issues/2177),
56+
[#2121](https://github.com/juanfont/headscale/issues/2121),
57+
[#2449](https://github.com/juanfont/headscale/issues/2449),
58+
[#363](https://github.com/juanfont/headscale/issues/363)).
59+
60+
What changed:
61+
62+
- Sanitisation and validation now come directly from
63+
`tailscale.com/util/dnsname.SanitizeHostname` / `ValidLabel`.
64+
- Admin rename (`headscale nodes rename`) now validates via `dnsname.ValidLabel` and
65+
rejects labels already held by another node (previously coerced invalid input silently).
66+
67+
Examples that previously regressed and now work:
68+
69+
| Input | Raw (Hostname) | DNS label (GivenName) |
70+
| -------------------- | -------------------- | --------------------- |
71+
| `Joe's Mac mini` | `Joe's Mac mini` | `joes-mac-mini` |
72+
| `Yuri's MacBook Pro` | `Yuri's MacBook Pro` | `yuris-macbook-pro` |
73+
| `Test@Host` | `Test@Host` | `test-host` |
74+
| `mail.server` | `mail.server` | `mail-server` |
75+
| `My-PC!` | `My-PC!` | `my-pc` |
76+
| `我的电脑` | `我的电脑` | `node` |
77+
4478
### BREAKING
4579

80+
#### Hostname handling
81+
82+
- The `GivenName` collision policy changed from an 8-char random hash suffix (`laptop-abc12xyz`) to a monotonic numeric suffix (`laptop`, `laptop-1`, `laptop-2`, …), matching Tailscale SaaS. Empty / all-non-ASCII hostnames now fall back to the literal `node` instead of `invalid-<rand>`. MagicDNS names change on upgrade for any node whose previous label was a random-suffix form; the raw `Hostname` column is unchanged.
83+
4684
#### ACL Policy
4785

4886
- Wildcard (`*`) in ACL sources and destinations now resolves to Tailscale's CGNAT range (`100.64.0.0/10`) and ULA range (`fd7a:115c:a1e0::/48`) instead of all IPs (`0.0.0.0/0` and `::/0`) [#3036](https://github.com/juanfont/headscale/pull/3036)

0 commit comments

Comments
 (0)