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:
Saleh
2026-07-05 02:07:01 +03:00
committed by GitHub
parent bc4343b083
commit 7abc21bc49
3 changed files with 70 additions and 2 deletions

View File

@@ -53,12 +53,17 @@ var svcbTestCases = []test.Case{
},
},
{
// Wildcard SVCB expansion (no additional section — wildcards don't run additionalProcessing)
// Wildcard SVCB expansion — glue for the in-bailiwick target is added to
// the additional section, same as for non-wildcard answers (issue #6629).
Qname: "_http._tcp.example.com.", Qtype: dns.TypeSVCB,
Answer: []dns.RR{
test.SVCB("_http._tcp.example.com. 1800 IN SVCB 1 svc-target.example.com. port=\"443\""),
},
Ns: svcbAuth,
Extra: []dns.RR{
test.A("svc-target.example.com. 1800 IN A 192.0.2.10"),
test.AAAA("svc-target.example.com. 1800 IN AAAA 2001:db8::10"),
},
},
{
// NoData: existing name, no SVCB record