BUG/MINOR: resolvers: Fix condition to release received ARs if not assigned
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 23 Feb 2021 10:59:19 +0000 (11:59 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 24 Feb 2021 20:58:45 +0000 (21:58 +0100)
commit9c246a4b6ce3fa0e70399e0158866d41b8662a7f
treebef3ef360bc721fe61d8ccb0e086311bcd1ae7cc
parent5926e384e62d6e47272062f1fbec235bd11cc517
BUG/MINOR: resolvers: Fix condition to release received ARs if not assigned

At the end of resolv_validate_dns_response(), if a received additionnal
record is not assigned to an existing server record, it is released. But the
condition to do so is buggy. If "answer_record" (the received AR) is not
assigned, "tmp_record" is not a valid record object. It is just a dummy
record "representing" the head of the record list.

Now, the condition is far cleaner. This patch must be backported as far as
2.2.
src/resolvers.c