MiniDNS / minidns

DNS library for Android and Java SE
Other
226 stars 61 forks source link

Request: increase default udp payload size buffer to recommended 1232 bytes #142

Closed realbiz21 closed 4 months ago

realbiz21 commented 4 months ago

Latest guidance[1] suggests using buffer sizes of 1232 bytes, which is optimized to reduce IP fragmentation as well as the need to switch to TCP. The default udpPayloadSize in minidns is 1024 bytes.

For example, a DNSSEC-validated DNSKEY record for <Root> will return UDP truncation with a buffer size of 1024 bytes. At present, the DNS payload is 1139 bytes.

dig +dnssec +bufsize=1024 DNSKEY .

Is there any opposition to increasing minidns' default size from 1024 to 1232?

[1]: https://www.dnsflagday.net/2020/#action-dns-software-vendors reads:

It is important for DNS software vendors to comply with DNS standards, and to use a default EDNS buffer size (1232 bytes) that will not cause fragmentation on typical network links. Relevant standards include RFC 7766, RFC 6891 section 6.2.3. and RFC 6891 section 6.2.4.. The motivation for this effort is described in IETF draft intarea-frag-fragile section 6.1 and IETF draft iab-protocol-maintenance.

Flowdalic commented 4 months ago

Is there any opposition to increasing minidns' default size from 1024 to 1232?

None at all, PRs welcome. Please also include the reference to the URL in the commit message.

realbiz21 commented 4 months ago

@Flowdalic - is PR #143 sufficient or did you have an alternate approach in mind?