Skip to content

feat: add NULL and CAA record type support and fix server EDNS mtu advertisement#70

Merged
crazydi4mond merged 2 commits into
net2share:mainfrom
ebpfx:feat/other-records
Apr 10, 2026
Merged

feat: add NULL and CAA record type support and fix server EDNS mtu advertisement#70
crazydi4mond merged 2 commits into
net2share:mainfrom
ebpfx:feat/other-records

Conversation

@ebpfx
Copy link
Copy Markdown
Contributor

@ebpfx ebpfx commented Apr 4, 2026

Summary

This PR adds NULL and CAA record type support with minimal changes to the existing record-type pipeline.

It also includes two small server-side MTU/EDNS cleanups:

  • the startup warning about -mtu was incorrectly shown for record types where -mtu still applies
  • the server response OPT RR now uses the configured -mtu instead of a hardcoded 4096

Changes

  • add NULL and CAA to record type parsing and CLI flags
  • add NULL and CAA encode/decode support on client and server
  • reuse the existing single-RR MTU calculation path for TXT, NULL, and CAA
  • keep -mtu warning only for name-limited record types: CNAME, NS, MX, and SRV
  • use the configured server UDP payload limit in the response OPT RR instead of always advertising 4096

Why change the EDNS response advertisement

This is a small consistency fix.

Before this change, the authoritative server always put 4096 in the response OPT RR, even when the actual response sizing logic was using the configured -mtu.

This change makes the response OPT RR follow the same configured limit that the server already uses for response sizing and truncation.

This does not change the existing acceptance logic for small-EDNS resolvers. It is mainly a cleanup so the response advertisement matches the server's actual configured ceiling.

Notes

  • client query OPT advertisement is unchanged
  • -dnstt-compat behavior is unchanged for wire format and still forces TXT
  • the -mtu warning now only appears for record types whose downstream capacity is actually bounded by DNS name length instead of UDP payload size

@parsa222
Copy link
Copy Markdown

parsa222 commented Apr 4, 2026

perfection!

@crazydi4mond crazydi4mond merged commit 8354db2 into net2share:main Apr 10, 2026
10 checks passed
@ebpfx ebpfx deleted the feat/other-records branch April 15, 2026 01:40
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.

3 participants