Skip to content

fix: lowercase DNS extra record names - #3366

Open
larrasket wants to merge 2 commits into
juanfont:mainfrom
larrasket:extra-records-case-insensitive
Open

fix: lowercase DNS extra record names#3366
larrasket wants to merge 2 commits into
juanfont:mainfrom
larrasket:extra-records-case-insensitive

Conversation

@larrasket

@larrasket larrasket commented Jul 4, 2026

Copy link
Copy Markdown

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

  • have read the CONTRIBUTING.md file
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

@larrasket
larrasket force-pushed the extra-records-case-insensitive branch from 722f652 to e63dcfd Compare July 4, 2026 13:29
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 juanfont#2782
@larrasket
larrasket force-pushed the extra-records-case-insensitive branch from e63dcfd to b690ee1 Compare August 27, 2026 05:43
Comment thread CHANGELOG.md
- Improve systemd service file hardening [#3341](https://github.com/juanfont/headscale/pull/3341)
- Headscale now requires Go 1.27 to build
- Lowercase DNS extra record names so mixed-case records resolve [#2782](https://github.com/juanfont/headscale/issues/2782)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets link the PR here in the changelog to follow the same style. Can you move it to under 0.29.4 and we get it out quicker.

@kradalby kradalby added this to the v0.29 milestone Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] extra records (JSON) works only when names are in lowercase

2 participants