]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: resolvers: don't dump a nameserver twice in "show resolvers"
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 29 Sep 2026 07:28:45 +0000 (09:28 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 10 Nov 2026 14:47:52 +0000 (15:47 +0100)
commit472a0ca440b6bb200b3ea3a23ba6ee10dbe8fa5f
tree50372032c96451481053ef329c74b076ebce1c0b
parent47eca42f8cce9df9a326dc90002e3d01b0e06e97
BUG/MINOR: resolvers: don't dump a nameserver twice in "show resolvers"

When the output buffer is full, "show resolvers" yields and resumes from
the nameserver saved in its context. But this one is only updated after a
nameserver was successfully dumped, so the dump resumes from the last
nameserver already dumped, which appears twice in the output, instead of
the one which could not be dumped.

This can be reproduced with 40 nameservers in a section and
"tune.bufsize 4096": "show resolvers" lists 43 nameservers, ns13, ns25
and ns37 appearing twice.

Let's save the nameserver being dumped before trying to dump it instead.

This patch should be backported to all stable branches.
src/resolvers.c