Skip to content

fix: lowercase cname rdata in normalization - #4940

Merged
TomOnTime merged 1 commit into
DNSControl:mainfrom
SethFalco:fix-4938
Sep 26, 2026
Merged

TomOnTime merged 1 commit into
DNSControl:mainfrom
SethFalco:fix-4938

Conversation

@SethFalco

@SethFalco SethFalco commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Apply Normalization to CNAME Target

See commit message(s).

Related

When DNS records already included CNAME Targets with uppercase
characters, they'd be stored in uppercase on disk and show as modified
in preview.

This just adds a normalization step to save to disk in lowercase regardless
of what the provider has, and for case-insensitive comparisons so it
doesn't create noise in preview/push.
@TomOnTime
TomOnTime merged commit d12f392 into DNSControl:main Sep 26, 2026
1 check passed
@SethFalco
SethFalco deleted the fix-4938 branch September 26, 2026 10:48
TomOnTime added a commit that referenced this pull request Sep 30, 2026
# Issue

Not all fields are normalized (changed to lowercase) so that future
comparisons do not need to be case aware.

This issue was fixed for CNAME in
#4940 but other record
fields, such as the MX record's Mx, are not normalized.

Tracking which record type fields need to be normalized is a PITA.

# Resolution

Create a function `normalizeRDATA()` which normalizes fields. The
function will be code-generated so that future rtypes will be properly
normalized.

While we're at it, let's normalize hex data to lowercase instead of
uppercase like the rest of the world does.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

CNAME record values, either case sensitive config or case insensitive diffs

2 participants