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:
parent
90f1b4943f
commit
85b10f296d
1 changed files with 4 additions and 1 deletions
|
|
@ -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{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue