]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: resolvers: classify empty truncated responses
authorManu Nicolas <e.nicolas@criteo.com>
Tue, 1 Sep 2026 10:44:42 +0000 (10:44 +0000)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 1 Sep 2026 15:58:13 +0000 (17:58 +0200)
commit3b400190830c5ed9b99e616d23eb8f52937f10e8
tree28bd0bb40cbd2ea2fe1a5f2e5ff68de7f9abaa36
parent15a436ba2885320169dce05eef1df8a04f91c2c5
BUG/MINOR: resolvers: classify empty truncated responses

The answer count is checked before the response question is parsed.
Most DNS servers return a truncated response without answers, so such
a response is classified as ANCOUNT_ZERO before the TC flag and
question type are examined. It increments the wrong counter and hides
the actual response status.

Move the empty-answer check after question parsing and TC handling.
Truncated SRV responses keep their existing partial-answer behavior.

This should be backported as far as 2.4.
src/resolvers.c