BUG/MEDIUM: dns: Don't yield in do-resolve action on a final evaluation
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 28 Jul 2020 08:21:54 +0000 (10:21 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 30 Jul 2020 08:03:58 +0000 (10:03 +0200)
commitaf018c4865400dda4553a732df4c43751a4ff88c
tree23fdde42fba5ff786a3cbbf4bc192cf45b8d255c
parenta500aee9f0d6e1fc17c65735944b4e5cb5c1165f
BUG/MEDIUM: dns: Don't yield in do-resolve action on a final evaluation

When an action is evaluated, flags are passed to know if it is the first call
(ACT_OPT_FIRST) and if it must be the last one (ACT_OPT_FINAL). For the
do-resolve DNS action, the ACT_OPT_FINAL flag must be handled because the
action may yield. It must never yield when this flag is set. Otherwise, it may
lead to a wakeup loop of the stream because the inspected-delay of a tcp-request
content ruleset was reached without stopping the rules evaluation.

This patch is related to the issue #222. It must be backported as far as 2.0.

(cherry picked from commit 385101e53816dc1b7bc1fc957adc512ce8a07cb4)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 5c038f759959adf95b4b347aba9d97e60ab87e93)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/dns.c