]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: resolvers: warn about ignored arguments on datagram nameservers
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 29 Sep 2026 08:54:09 +0000 (10:54 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 10 Nov 2026 14:47:52 +0000 (15:47 +0100)
commitfacf6eba92e2ccdb29f47156cac65f6675227834
tree7b63833d7d476ed1d476b9c0c16ff8f498b12851
parentdc537b91a62bbeda4de950fffd8909ab81d78399
BUG/MINOR: resolvers: warn about ignored arguments on datagram nameservers

Since TCP nameservers were supported, the "nameserver" line accepts server
keywords after the address (e.g. "ssl", "verify"), which are parsed by
parse_server() for "tcp@" addresses. For datagram nameservers these
arguments are silently ignored. A typo such as forgetting the "tcp@"
prefix on "nameserver ns1 1.2.3.4:853 ssl verify none" thus results in
plain DNS being sent over UDP to the DoT port (and, since commit bc20f8c0b
("MEDIUM: resolvers: retry truncated UDP responses over TCP"), over plain
TCP for fallback queries) without any notice.

Let's emit a warning when arguments follow the address of a datagram
nameserver. A warning rather than an error is used so as not to break
existing configurations.

This patch may be backported to stable branches.
doc/configuration.txt
src/resolvers.c