]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: resolvers: Test for empty tree when getting a record from DNS answer
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 11 Sep 2025 19:21:44 +0000 (21:21 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 12 Sep 2025 09:09:19 +0000 (11:09 +0200)
commitf6dfbbe870999d0bcf1c46306563117a4dc848e9
treec1c10f2957cd65ce4df2f6f78dea47a3dcecd218
parentd738fa4ec0f82de03c85eb8f8590791686098fd1
BUG/MEDIUM: resolvers: Test for empty tree when getting a record from DNS answer

In the previous fix 5d1d93fad ("BUG/MEDIUM: resolvers: Properly handle empty
tree when getting a record from the DNS answer"), I missed the fact the
answer tree can be empty.

So, to avoid crashes, when the answer tree is empty, we immediately exit
from resolv_get_ip_from_response() function with RSLV_UPD_NO_IP_FOUND. In
addition, when a record is removed from the tree, we take care to reset the
next node saved if necessary.

This patch must be backported with the commit above.
src/resolvers.c