Skip to content

Commit 826b080

Browse files
authored
Merge pull request #16 from chris-edwards-pub/soa-authority-section
An attempt to fix the SOA authority section.
2 parents dc91b09 + eff4030 commit 826b080

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

handler.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ func (handler *CoreDNSMySql) ServeDNS(ctx context.Context, w dns.ResponseWriter,
6060
records = append(records, recs...)
6161
}
6262

63+
if qType == "SOA" {
64+
recsNs, err := handler.findRecord(qZone, qName, "NS")
65+
if err != nil {
66+
return handler.errorResponse(state, dns.RcodeServerFailure, err)
67+
}
68+
records = append(records, recsNs...)
69+
}
70+
6371
if qType == "AXFR" {
6472
return handler.errorResponse(state, dns.RcodeNotImplemented, nil)
6573
}

0 commit comments

Comments
 (0)