checker: join SRV record Hdr.Name to service domain before parsing

SRV record owners inside the service body are relative to the service
location (subdomain.domain). Using Hdr.Name directly produced relative
owners in the report and broke grouping/dedup. Join via
sdk.JoinRelative against the already-computed serviceDomain.
This commit is contained in:
nemunaire 2026-04-29 17:35:47 +07:00
commit 85b10f296d

View file

@ -86,7 +86,10 @@ func (p *srvProvider) Collect(ctx context.Context, opts sdk.CheckerOptions) (any
}
for _, r := range payload.Records {
owner := strings.TrimSuffix(r.Hdr.Name, ".")
// Hdr.Name is relative to the service location (serviceDomain =
// subdomain.domain), so we join it with serviceDomain before
// treating as FQDN.
owner := sdk.JoinRelative(r.Hdr.Name, serviceDomain)
svc, proto := parseOwner(owner, serviceDomain)
rec := SRVRecord{