mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 10:43:17 -04:00
CNAMEs targets should be in answer section.
A target of a cname must be put in the answer section. Fix this and add a AAAA test for quad-AAAA CNAME responses. Fixes #125
This commit is contained in:
@@ -151,15 +151,15 @@ func (z *Zone) lookupCNAME(rrs []dns.RR, qtype uint16, do bool) ([]dns.RR, []dns
|
||||
if elem == nil {
|
||||
return rrs, nil, nil, Success
|
||||
}
|
||||
extra := cnameForType(elem.All(), qtype)
|
||||
targets := cnameForType(elem.All(), qtype)
|
||||
if do {
|
||||
sigs := elem.Types(dns.TypeRRSIG)
|
||||
sigs = signatureForSubType(sigs, qtype)
|
||||
if len(sigs) > 0 {
|
||||
extra = append(extra, sigs...)
|
||||
targets = append(targets, sigs...)
|
||||
}
|
||||
}
|
||||
return rrs, nil, extra, Success
|
||||
return append(rrs, targets...), nil, nil, Success
|
||||
}
|
||||
|
||||
func cnameForType(targets []dns.RR, origQtype uint16) []dns.RR {
|
||||
|
||||
Reference in New Issue
Block a user