diff --git a/doc/configuration.txt b/doc/configuration.txt index 383ec1519..1f5d605bc 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -14629,7 +14629,12 @@ accepted_payload_size is in bytes. If not set, HAProxy announces 512. (minimal value defined by RFC 6891) - Note: the maximum allowed value is 8192. + Note: the maximum allowed value is 65535. Recommended value for UDP is + 4096 and it is not recommended to exceed 8192 except if you are sure + that your system and network can handle this (over 65507 makes no sense + since is the maximum UDP payload size). If you are using only TCP + nameservers to handle huge DNS responses, you should put this value + to the max: 65535. nameserver : UDP DNS server description: diff --git a/include/haproxy/resolvers-t.h b/include/haproxy/resolvers-t.h index 4e1654526..ba373707c 100644 --- a/include/haproxy/resolvers-t.h +++ b/include/haproxy/resolvers-t.h @@ -41,7 +41,7 @@ extern struct pool_head *resolv_requester_pool; */ #define DNS_MAX_LABEL_SIZE 63 #define DNS_MAX_NAME_SIZE 255 -#define DNS_MAX_UDP_MESSAGE 8192 +#define DNS_MAX_UDP_MESSAGE 65535 /* DNS minimum record size: 1 char + 1 NULL + type + class */ #define DNS_MIN_RECORD_SIZE (1 + 1 + 2 + 2)