BUG/MEDIUM: tcp-rules: Fix track-sc* actions for L4/L5 TCP rules
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 10 Feb 2020 08:54:49 +0000 (09:54 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 10 Feb 2020 09:09:58 +0000 (10:09 +0100)
commit67307796e63ec45a024de6fa4368cc749d527b98
treea74084dad40de2bf6e42ebcc40ebe1f13d5896ca
parent696f317f13151e4427e3f9a8b560730ed6a7bb40
BUG/MEDIUM: tcp-rules: Fix track-sc* actions for L4/L5 TCP rules

A bug was introduced during TCP rules refactoring by the commit ac98d81f4
("MINOR: http-rule/tcp-rules: Make track-sc* custom actions"). There is no
stream when L4/L5 TCP rules are evaluated. For these rulesets, In track-sc*
actions, we must take care to rely on the session instead of the stream.

Because of this bug, any evaluation of L4/L5 TCP rules using a track-sc* action
leads to a crash of HAProxy.

No backport needed, except if the above commit is backported.
src/tcp_rules.c