mirror of
https://github.com/coredns/coredns.git
synced 2025-11-24 20:54:02 -05:00
Do not muck with ordering of XFRs (#2329)
The loadbalancer plugin reorders records. It was doing this for zone transfers - if you had a CNAME in the zone then your transfer would be broken because it would get put before the SOA record.
This commit is contained in:
committed by
Miek Gieben
parent
973349592e
commit
9d41fa663c
@@ -14,6 +14,10 @@ func (r *RoundRobinResponseWriter) WriteMsg(res *dns.Msg) error {
|
||||
return r.ResponseWriter.WriteMsg(res)
|
||||
}
|
||||
|
||||
if res.Question[0].Qtype == dns.TypeAXFR || res.Question[0].Qtype == dns.TypeIXFR {
|
||||
return r.ResponseWriter.WriteMsg(res)
|
||||
}
|
||||
|
||||
res.Answer = roundRobin(res.Answer)
|
||||
res.Ns = roundRobin(res.Ns)
|
||||
res.Extra = roundRobin(res.Extra)
|
||||
|
||||
Reference in New Issue
Block a user