From: Emeric Brun Date: Wed, 7 Apr 2021 14:04:54 +0000 (+0200) Subject: MEDIUM: resolvers: add support of tcp address on nameserver line. X-Git-Tag: v2.4-dev16~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8f3e45c6a912cdfe382f0966104d7acafb05b7c;p=thirdparty%2Fhaproxy.git MEDIUM: resolvers: add support of tcp address on nameserver line. This patch re-works configuration parsing, it removes the "server" lines from "resolvers" sections introduced in commit 56fc5d9eb: MEDIUM: resolvers: add supports of TCP nameservers in resolvers. It also extends the nameserver lines to support stream server addresses such as: resolvers nameserver localhost tcp@127.0.0.1:53 Doing so, a part of nameserver's init code was factorized in function 'parse_resolvers' and removed from 'post_parse_resolvers'. --- diff --git a/doc/configuration.txt b/doc/configuration.txt index 128f66fcab..01a01ecccd 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -14828,18 +14828,16 @@ accepted_payload_size nameservers to handle huge DNS responses, you should put this value to the max: 65535. -nameserver : - UDP DNS server description: - : label of the server, should be unique - : IP address of the server - : port where the DNS service actually runs - -server
[param*] - Used to configure a DNS TCP or stream server. This supports for all - "server" parameters found in 5.2 paragraph. Some of these parameters - are irrelevant for DNS resolving. Note: currently 4 queries are pipelined - on the same connections. A batch of idle connections are removed every - 5 seconds. "maxconn" can be configured to limit the amount of those +nameserver
[:port] [param*] + Used to configure a nameserver. of the nameserver should ne unique. + By default the
is considered of type datagram. This means if an + IPv4 or IPv6 is configured without special address prefixes (paragraph 11.) + the UDP protocol will be used. If an stream protocol address prefix is used, + the nameserver will be considered as a stream server (TCP for instance) and + "server" parameters found in 5.2 paragraph which are relevant for DNS + resolving will be considered. Note: currently, in TCP mode, 4 queries are + pipelined on the same connections. A batch of idle connections are removed + every 5 seconds. "maxconn" can be configured to limit the amount of those concurrent connections and TLS should also usable if the server supports. parse-resolv-conf @@ -14885,6 +14883,7 @@ timeout