BUG/MAJOR: check: fix breakage of inverted tcp-check rules

Recent commit 22b09d2 ("MINOR: include comment in tcpcheck error log")
accidently left a double-step to the next rule in case of an inverted
rule. The effect is that an inverted rule is necessarily skipped and
that we can crash if it was the last rule since we'd use as a rule the
head of the list, thus dereference random memory contents.

No backport is needed.
This commit is contained in:
Willy Tarreau 2015-05-12 11:57:07 +02:00
parent d60a9e5a39
commit 6296a11ea4

View File

@ -2820,8 +2820,6 @@ static void tcpcheck_main(struct connection *conn)
check->current_step = cur;
cur = (struct tcpcheck_rule*)cur->list.n;
check->current_step = cur;
if (check->current_step->action == TCPCHK_ACT_EXPECT)
goto tcpcheck_expect;
__conn_data_stop_recv(conn);