mirror of
https://github.com/joohoi/acme-dns.git
synced 2024-12-22 21:13:54 +07:00
SOA belongs in authority section in case of NODATA response
https://datatracker.ietf.org/doc/html/rfc2308#section-2.2
This commit is contained in:
parent
6d6fe51d92
commit
b1ed162494
3
dns.go
3
dns.go
@ -124,7 +124,8 @@ func (d *DNSServer) readQuery(m *dns.Msg) {
|
||||
}
|
||||
m.MsgHdr.Authoritative = authoritative
|
||||
if authoritative {
|
||||
if m.MsgHdr.Rcode == dns.RcodeNameError {
|
||||
if m.MsgHdr.Rcode == dns.RcodeNameError ||
|
||||
(m.MsgHdr.Rcode == dns.RcodeSuccess && len(m.Answer) == 0) {
|
||||
m.Ns = append(m.Ns, d.SOA)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user