Compare commits

..
1 Commits
Author SHA1 Message Date
clawbot 354db6b524 resolver: lower-case DNS names in record values (closes #157)
check / check (push) Successful in 1m1s
Nameservers may answer with DNS names in any letter case. For eeqj.de,
y.ns.joker.com answers in upper case while its peers answer in lower
case, so the inconsistency check fired on every cycle. extractRecordValue
now lower-cases CNAME, MX, SRV and NS targets, so the inconsistency check
and the record-change check both compare names regardless of case. A,
AAAA, TXT and CAA values are unchanged. State saved before this change
can hold upper-case names, which report a one-time record change on the
first check after upgrading.

Model: opus-5-5
2026-09-28 21:16:07 +00:00
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -63,8 +63,8 @@ rejected.
merged view — it is a map from nameserver to record set.
- DNS names inside record values (CNAME, MX, SRV and NS targets) are
stored in lower case, because names are case-insensitive and
nameservers may answer in any letter case. TXT and CAA values keep
their letter case; they are not lower-cased.
nameservers may answer in any letter case. TXT and CAA values are
stored exactly as received.
- Any observable change in any nameserver's response triggers a
notification. This includes:
- **Record change**: A nameserver returns different records than it
+2 -2
View File
@@ -610,8 +610,8 @@ func classifyResponse(resp *NameserverResponse, state queryState) {
// extractRecordValue formats a DNS RR value as a string. DNS names
// are case-insensitive and nameservers may answer in any letter case,
// so names are lower-cased to compare equal. TXT and CAA values keep
// their letter case.
// so names are lower-cased to compare equal. TXT and CAA values are
// kept exactly as received.
func extractRecordValue(rr dns.RR) string {
switch r := rr.(type) {
case *dns.A: