checker: resolve relative NS labels using the zone origin
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is failing

NS hostnames stored in happyDomain's abstract.Origin service are encoded
relative to the zone apex (e.g. "ns0" instead of "ns0.example.com.").
normalizeNSList was calling dns.Fqdn() directly, turning "ns0" into the
useless single-label "ns0." rather than the correct FQDN.

Expose domain_name in ServiceOpts so happyDomain auto-fills the zone
apex at service scope, then use sdk.JoinRelative in normalizeNSList to
absolutize relative labels.  Absolute FQDNs (trailing dot) are kept
as-is so external nameservers round-trip safely.
This commit is contained in:
nemunaire 2026-05-16 21:32:09 +08:00
commit 744a75b25d
3 changed files with 17 additions and 6 deletions

View file

@ -110,6 +110,11 @@ func (p *authoritativeConsistencyProvider) Definition() *sdk.CheckerDefinition {
Label: "Origin service",
AutoFill: sdk.AutoFillService,
},
{
Id: "domain_name",
Label: "Zone name",
AutoFill: sdk.AutoFillDomainName,
},
},
},
Rules: Rules(),