BUG/MAJOR: spoe: Fix initialization of thread-dependent fields
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 18 Mar 2019 12:57:42 +0000 (13:57 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 18 Mar 2019 13:07:38 +0000 (14:07 +0100)
commitfe261551b9980fe33990eb34d2153bf1de24b20f
tree9ae1ae3a92fd33034fdea15470404ea5ce7bb05c
parentc6c37b2d4696559eb0a9aa8d61e4f7fc7ef758d9
BUG/MAJOR: spoe: Fix initialization of thread-dependent fields

A bug was introduced in the commit b0769b ("BUG/MEDIUM: spoe: initialization
depending on nbthread must be done last"). The code depending on global.nbthread
was moved from cfg_parse_spoe_agent() to spoe_check() but the pointer on the
agent configuration was not updated to use the filter's one. The variable
curagent is a global variable only valid during the configuration parsing. In
spoe_check(), conf->agent must be used instead.

This patch must be backported to 1.9 and 1.8.
src/flt_spoe.c