BUG/MEDIUM: resolvers: Fix the loop looking for an existing ADD item
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 10 Mar 2021 14:19:57 +0000 (15:19 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 12 Mar 2021 16:41:24 +0000 (17:41 +0100)
commit77f860699c17426ee6e727fa07a287b32276f1dd
tree44c708361fd95a8183119975573adb0d855c971a
parentab177ac1f31b5c6c2e4f7d023923dd668cce3076
BUG/MEDIUM: resolvers: Fix the loop looking for an existing ADD item

For each ADD item found in a SRV response, we try to find a corresponding
ADD item already attached to an existing SRV item. If found, the ADD
last_seen time is updated, otherwise we try to find a SRV item with no ADD
to attached the new one.

However, the loop is buggy. Instead of comparing 2 ADD items, it compares
the new ADD item with the SRV item. Because of this bug, we are unable to
renew last_seen time of existing ADD.

This patch must be backported as far as 2.2.
src/resolvers.c