mirror of
https://github.com/coredns/coredns.git
synced 2025-11-21 11:22:20 -05:00
file/plugin: if there is a delegation use that (#1299)
Don't put NS records in the answer section; if we see it is delegated we should put the records in the AUTHORITY section. This removes a special case, which is good.
This commit is contained in:
@@ -128,11 +128,6 @@ func (z *Zone) Lookup(state request.Request, qname string) ([]dns.RR, []dns.RR,
|
||||
// If we see NS records, it means the name as been delegated, and we should return the delegation.
|
||||
if nsrrs := elem.Types(dns.TypeNS); nsrrs != nil {
|
||||
glue := z.Glue(nsrrs, do)
|
||||
// If qtype == NS, we should returns success to put RRs in answer.
|
||||
if qtype == dns.TypeNS {
|
||||
return nsrrs, nil, glue, Success
|
||||
}
|
||||
|
||||
if do {
|
||||
dss := z.typeFromElem(elem, dns.TypeDS, do)
|
||||
nsrrs = append(nsrrs, dss...)
|
||||
|
||||
Reference in New Issue
Block a user