]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: dns: don't downgrade DNS accepted payload size automatically
authorBaptiste Assmann <bedis9@gmail.com>
Thu, 1 Mar 2018 21:26:57 +0000 (22:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 19 Mar 2018 10:41:52 +0000 (11:41 +0100)
Automatic downgrade of DNS accepted payload size may have undesired side
effect, which could make a backend with all servers DOWN.

After talking with Lukas on the ML, I realized this "feature" introduces
more issues that it fixes problem.
The "best" way to handle properly big responses will be to implement DNS
over TCP.

To be backported to 1.8.

doc/configuration.txt
src/dns.c

index 992e18acc7915c5f71622e21079ed1a09903fb44..d6f8b8d3884fc7046b9892ee6067da4b0fdfa719 100644 (file)
@@ -12009,9 +12009,6 @@ accepted_payload_size <nb>
   <nb> is in bytes. If not set, HAProxy announces 512. (minimal value defined
        by RFC 6891)
 
-  Note: to get bigger responses but still be sure that responses won't be
-        dropped on the wire, one can choose a value between 1280 and 1410.
-
   Note: the maximum allowed value is 8192.
 
 nameserver <id> <ip>:<port>
index 280bc155f78cef09a8cc5052c7e6d8a213905012..c5bed59b1b034d638acd18455cefa585eebe5d82 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -1733,12 +1733,6 @@ static struct task *dns_process_resolvers(struct task *t)
                        dns_reset_resolution(res);
                        LIST_DEL(&res->list);
                        LIST_ADDQ(&resolvers->resolutions.wait, &res->list);
-
-                       /* This might be triggered by too big UDP packets
-                        * dropped somewhere on the network, so lowering the
-                        * accepted_payload_size announced */
-                       if (resolvers->accepted_payload_size > 1280)
-                               resolvers->accepted_payload_size = 1280;
                }
                else {
                        /* Otherwise resend the DNS query and requeue the resolution */