mirror of
https://github.com/coredns/coredns.git
synced 2026-07-10 17:50:12 -04:00
plugin/file: run additional processing for wildcard answers (#8222)
* plugin/file: run additional processing for wildcard answers The wildcard branch of Zone.Lookup returned a nil additional section, so a wildcard-synthesized MX/SRV/SVCB/HTTPS answer with an in-bailiwick target did not include the target's A/AAAA glue. The non-wildcard path already does this, so call additionalProcessing in the wildcard branch as well. Fixes #6629 Signed-off-by: Salih Muhammed <root@lr0.org> * plugin/file: move wildcard additional test into wildcard_test.go Requested in review: keep the wildcard tests in one file. Signed-off-by: Salih Muhammed <root@lr0.org> --------- Signed-off-by: Salih Muhammed <root@lr0.org>
This commit is contained in:
@@ -226,6 +226,11 @@ func (z *Zone) Lookup(ctx context.Context, state request.Request, qname string)
|
||||
return nil, ret, nil, NoData
|
||||
}
|
||||
|
||||
// Additional section processing for MX, SRV, SVCB, HTTPS. Check response
|
||||
// and see if any of the names are in bailiwick - if so add IP addresses
|
||||
// to the additional section. This mirrors the non-wildcard path above.
|
||||
additional := z.additionalProcessing(rrs, do)
|
||||
|
||||
auth := ap.ns(do)
|
||||
if do {
|
||||
// An NSEC is needed to say no longer name exists under this wildcard.
|
||||
@@ -238,7 +243,7 @@ func (z *Zone) Lookup(ctx context.Context, state request.Request, qname string)
|
||||
sigs = rrutil.SubTypeSignature(sigs, qtype)
|
||||
rrs = append(rrs, sigs...)
|
||||
}
|
||||
return rrs, auth, nil, Success
|
||||
return rrs, auth, additional, Success
|
||||
}
|
||||
|
||||
rcode := NameError
|
||||
|
||||
Reference in New Issue
Block a user