1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

AXFRDDNS Fix docs, fix handling of unsupported record types (#2335)

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
Grégoire Henry
2023-05-09 03:44:42 +02:00
committed by GitHub
parent 1e470b1c0b
commit dda3fc8cc1
2 changed files with 54 additions and 10 deletions

View File

@ -281,16 +281,19 @@ func (c *axfrddnsProvider) GetZoneRecords(domain string, meta map[string]string)
var foundDNSSecRecords *models.RecordConfig
foundRecords := models.Records{}
for _, rr := range rawRecords {
switch rr.(type) {
case *dns.RRSIG,
*dns.DNSKEY,
*dns.CDNSKEY,
*dns.CDS,
*dns.NSEC,
*dns.NSEC3,
*dns.NSEC3PARAM:
switch rr.Header().Rrtype {
case dns.TypeRRSIG,
dns.TypeDNSKEY,
dns.TypeCDNSKEY,
dns.TypeCDS,
dns.TypeNSEC,
dns.TypeNSEC3,
dns.TypeNSEC3PARAM,
65534:
// Ignoring DNSSec RRs, but replacing it with a single
// "TXT" placeholder
// Also ignoring spurious TYPE65534, see:
// https://bind9-users.isc.narkive.com/zX29ay0j/rndc-signing-list-not-working#post2
if foundDNSSecRecords == nil {
foundDNSSecRecords = new(models.RecordConfig)
foundDNSSecRecords.Type = "TXT"