resolve: change DNS_PACKET_UNICAST_SIZE_LARGE_MAX to 1232 (#27171)

The old common default was 4096, until 2020 on which all DNS servers (verified
on BIND9, NSD, Unbound, dnsmasq) switched to 1232 as an agreed max size [1].

[1] https://www.dnsflagday.net/2020/#message-size-considerations
This commit is contained in:
Cristian Rodríguez 2023-04-07 03:52:52 -04:00 committed by GitHub
parent 1e094cb4ba
commit e144a26306
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,8 +55,8 @@ assert_cc(sizeof(DnsPacketHeader) == 12);
/* RFC 1035 say 512 is the maximum, for classic unicast DNS */
#define DNS_PACKET_UNICAST_SIZE_MAX 512u
/* With EDNS0 we can use larger packets, default to 4096, which is what is commonly used */
#define DNS_PACKET_UNICAST_SIZE_LARGE_MAX 4096u
/* With EDNS0 we can use larger packets, default to 1232, which is what is commonly used */
#define DNS_PACKET_UNICAST_SIZE_LARGE_MAX 1232u
struct DnsPacket {
unsigned n_ref;