Skip to content

plugin/file: expand SVCB/HTTPS record support#7950

Merged
thevilledev merged 2 commits into
coredns:masterfrom
IngmarVG-IB:feature/svcb-support
Mar 28, 2026
Merged

plugin/file: expand SVCB/HTTPS record support#7950
thevilledev merged 2 commits into
coredns:masterfrom
IngmarVG-IB:feature/svcb-support

Conversation

@IngmarVG-IB

Copy link
Copy Markdown
Contributor

1. Why is this pull request needed and what does it do?

CoreDNS currently parses SVCB (type 64) and HTTPS (type 65) records from zone files via miekg/dns, but the file plugin does not perform additional section processing or target normalization for them. This PR adds:

  • Additional section processing: A/AAAA glue records for in-bailiwick SVCB/HTTPS targets in the additional section, matching existing SRV/MX behavior (plugin/file/lookup.go)
  • Target name normalization: Lowercase SVCB/HTTPS Target on zone insert, consistent with CNAME/MX handling (plugin/file/zone.go)
  • Metrics: Add TypeSVCB to monitored query types; TypeHTTPS was already present (plugin/metrics/vars/monitor.go)
  • Test helpers: SVCB()/HTTPS() constructors and Section() comparison cases (plugin/test/helpers.go)
  • Tests: Basic queries with glue, AliasMode, wildcards, NoData, NXDOMAIN, target normalization, and DNS-AID private-use key (65400-65408) round-trip (plugin/file/svcb_test.go)

2. Which issues (if any) are related?

None — this is a new feature contribution.

3. Which documentation changes (if any) need to be made?

None — no new Corefile syntax; existing zone file records just work correctly now.

4. Does this introduce a backward incompatible change or deprecation?

No. This is purely additive. Existing SVCB/HTTPS records in zone files were already parsed; they now get proper glue and normalization treatment.

Add proper SVCB (type 64) and HTTPS (type 65) handling:

- Additional section processing: include A/AAAA glue for in-bailiwick
  SVCB/HTTPS targets, matching existing SRV/MX behavior
- Target name normalization: lowercase SVCB/HTTPS Target on zone insert,
  consistent with CNAME/MX handling
- Metrics: add TypeSVCB to monitored query types (TypeHTTPS was already
  present)
- Test helpers: add SVCB()/HTTPS() constructors and Section comparison
  cases
- Tests: basic queries with glue, AliasMode, wildcards, NoData, NXDOMAIN,
  target normalization, and DNS-AID private-use key (65400-65408)
  round-trip

Signed-off-by: Ingmar <ivanglabbeek@infoblox.com>

@thevilledev thevilledev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution! I'm just echoining a few minor linter issues, other than that it's good to go IMO.

Comment thread plugin/file/lookup.go Outdated
Comment thread plugin/file/zone.go Outdated
dns.HTTPS embeds dns.SVCB, so .Target is directly accessible
without the redundant .SVCB. qualifier. Fixes gosimple S1027.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ingmar <ivanglabbeek@infoblox.com>
@IngmarVG-IB

Copy link
Copy Markdown
Contributor Author

Thanks for the review @thevilledev! Pushed c748f10 to simplify the HTTPS target access — using field promotion (.Target instead of .SVCB.Target) in both lookup.go and zone.go as suggested.

@thevilledev

Copy link
Copy Markdown
Collaborator

Hey @IngmarVG-IB, I can't see the commit in this branch. Can you double-check you pushed it to the right branch?

@IngmarVG-IB

Copy link
Copy Markdown
Contributor Author

Sorry about that @thevilledev — I pushed to the wrong fork remote. It should be visible now (c748f10).

@thevilledev thevilledev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @IngmarVG-IB!

@thevilledev thevilledev merged commit 12d9457 into coredns:master Mar 28, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants