Skip to content

Commit

Permalink
in domain/dns self-check, for unexpected SRV records for "srv autocon…
Browse files Browse the repository at this point in the history
…fig", show the values of the unexpected records

should be more helpful in understanding what's wrong.

feedback from mteege, thanks!
  • Loading branch information
mjl- committed Feb 16, 2025
1 parent 6f67812 commit 3d0dc3a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webadmin/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,11 @@ When enabling MTA-STS, or updating a policy, always update the policy first (thr
addf(&r.SRVConf.Errors, "Missing SRV record %q", name)
}
} else if len(req.srvs) != 1 || req.srvs[0].Target != req.host || req.srvs[0].Port != req.port {
addf(&r.SRVConf.Errors, "Unexpected SRV record(s) for %q", name)
var srvs []string
for _, srv := range req.srvs {
srvs = append(srvs, fmt.Sprintf("%d %d %d %s", srv.Priority, srv.Weight, srv.Port, srv.Target))
}
addf(&r.SRVConf.Errors, "Unexpected SRV record(s) for %q: %s", name, strings.Join(srvs, ", "))
}
}
addf(&r.SRVConf.Instructions, instr)
Expand Down

0 comments on commit 3d0dc3a

Please sign in to comment.