DNS: Proposing Incremental Improvements for Name-Containing DNS RDATA Types
Hi, I’ve been exploring Netty’s DNS codec and had a question about how it currently handles RDATA for records that contain domain names.
Right now, a few record types with simple “single domain-name” RDATA get special handling:
- PTR is decoded into DefaultDnsPtrRecord
- CNAME and NS: RDATA is passed through DnsCodecUtil.decompressDomainName(...) and re-encoded without compression pointers
For other RR types that also include domain-name fields in their RDATA (for example SOA with MNAME/RNAME, or MX and SRV with a trailing domain name), the decoder returns a DefaultDnsRawRecord without attempting to decompress those embedded names.
I wasn’t sure whether this is by design or simply an area that hasn’t been expanded yet. If it’s something the project would like to support, I’d be happy to contribute some patches.
My idea would be to add decompression support one record type at a time with an associated DefaultDns*Record (e.g., MX first, then SOA, SRV, etc.) so the changes are easy to review and I/we can confirm the direction incrementally. I’d really appreciate any guidance on whether this aligns with the intended scope of the codec and whether maintainers would be open to reviewing PRs in this area.
Thanks, and looking forward to hearing your thoughts!
Source: netty/netty