Skip to content

Commit

Permalink
Merge pull request #16 from chris-edwards-pub/soa-authority-section
Browse files Browse the repository at this point in the history
An attempt to fix the SOA authority section.
  • Loading branch information
khash authored Mar 6, 2023
2 parents dc91b09 + eff4030 commit 826b080
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ func (handler *CoreDNSMySql) ServeDNS(ctx context.Context, w dns.ResponseWriter,
records = append(records, recs...)
}

if qType == "SOA" {
recsNs, err := handler.findRecord(qZone, qName, "NS")
if err != nil {
return handler.errorResponse(state, dns.RcodeServerFailure, err)
}
records = append(records, recsNs...)
}

if qType == "AXFR" {
return handler.errorResponse(state, dns.RcodeNotImplemented, nil)
}
Expand Down

0 comments on commit 826b080

Please sign in to comment.