dns: change UDPMaxLen to 1232 bytes

This commit is contained in:
nadoo committed 2024-08-05 23:31:19 +08:00
1 parent c71c95482a
commit 7d4075282d
4 files changed
+31 -57

No files matched your search

+2 -5
View File
@@ -11,11 +11,8 @@ import (
)
// UDPMaxLen is the max size of udp dns request.
// https://www.rfc-editor.org/rfc/rfc1035#section-4.2.1
// Messages carried by UDP are restricted to 512 bytes (not counting the IP
// or UDP headers). Longer messages are truncated and the TC bit is set in
// the header.
const UDPMaxLen = 512
// https://www.dnsflagday.net/2020/
const UDPMaxLen = 1232
// HeaderLen is the length of dns msg header.
const HeaderLen = 12