BUG/MEDIUM: resolvers: handle huge responses over tcp servers.
authorEmeric Brun <ebrun@haproxy.com>
Mon, 8 Mar 2021 15:41:29 +0000 (16:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 9 Mar 2021 14:44:46 +0000 (15:44 +0100)
commit4c75195f5b5f4cc13f6b952e4d00d280f360bc05
tree747fc012f3ebfb515b442ca6ba0478486486978b
parente89fae3a4eb6dec00743b436ce164e03d7630b1c
BUG/MEDIUM: resolvers: handle huge responses over tcp servers.

Parameter "accepted_payload_size" is currently considered regardless
the used nameserver is using TCP or UDP. It remains mandatory to annouce
such capability to support e-dns, so a value have to be announced also
in TCP. Maximum DNS message size in TCP is limited by protocol to 65535
and so for UDP (65507) if system supports such UDP messages. But
the maximum value for this option was arbitrary forced to 8192.

This patch change this maximum to 65535 to allow user to set bigger value
for UDP if its system supports. It also sets accepted_payload_size
in TCP allowing to retrieve huge responses if the configuration uses
TCP nameservers.

The request announcing the accepted_payload_size capability is currently
built at resolvers level and is common to all used nameservers of the
section regardess transport protocol used. A further patch should be
made to at least specify a different payload size depending of the
transport, and perhaps could be forced to 65535 in case of TCP and
maximum would be forced back to 65507 matching UDP max.

This patch is appliable since 2.4 version
doc/configuration.txt
include/haproxy/resolvers-t.h