Set the default maximum DNS UDP packet size to 1232.
authorSimon Kelley <simon@thekelleys.org.uk>
Tue, 7 Mar 2023 22:07:46 +0000 (22:07 +0000)
committerSimon Kelley <simon@thekelleys.org.uk>
Tue, 7 Mar 2023 22:21:21 +0000 (22:21 +0000)
http://www.dnsflagday.net/2020/ refers.

Thanks to Xiang Li for the prompt.

CHANGELOG
man/dnsmasq.8
src/config.h

index 3af20cf..52d8678 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,8 +7,15 @@ version 2.90
        domain are configured, but no server which is not qualified
        for a particular domain. Thanks to Daniel Danzberger for
        spotting this bug.
-       
 
+       Set the default maximum DNS UDP packet sice to 1232. This
+       has been the recommended value since 2020 because it's the
+       largest value that avoid fragmentation, and fragmentation
+       is just not reliable on the modern internet, especially
+       for IPv6. It's still possible to override this with
+       --edns-packet-max for special circumstances.
+
+       
 version 2.89
         Fix bug introduced in 2.88 (commit fe91134b) which can result
        in corruption of the DNS cache internal data structures and
index 41e2e04..5acb935 100644 (file)
@@ -183,7 +183,8 @@ to zero completely disables DNS function, leaving only DHCP and/or TFTP.
 .TP
 .B \-P, --edns-packet-max=<size>
 Specify the largest EDNS.0 UDP packet which is supported by the DNS
-forwarder. Defaults to 4096, which is the RFC5625-recommended size.
+forwarder. Defaults to 1232, which is the recommended size following the
+DNS flag day in 2020. Only increase if you know what you are doing.
 .TP
 .B \-Q, --query-port=<query_port>
 Send outbound DNS queries from, and listen for their replies on, the
index 1e7b30f..37b374e 100644 (file)
@@ -19,7 +19,7 @@
 #define CHILD_LIFETIME 150 /* secs 'till terminated (RFC1035 suggests > 120s) */
 #define TCP_MAX_QUERIES 100 /* Maximum number of queries per incoming TCP connection */
 #define TCP_BACKLOG 32  /* kernel backlog limit for TCP connections */
-#define EDNS_PKTSZ 4096 /* default max EDNS.0 UDP packet from RFC5625 */
+#define EDNS_PKTSZ 1232 /* default max EDNS.0 UDP packet from from  /dnsflagday.net/2020 */
 #define SAFE_PKTSZ 1232 /* "go anywhere" UDP packet size, see https://dnsflagday.net/2020/ */
 #define KEYBLOCK_LEN 40 /* choose to minimise fragmentation when storing DNSSEC keys */
 #define DNSSEC_WORK 50 /* Max number of queries to validate one question */