]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MAJOR: check: fix breakage of inverted tcp-check rules
authorWilly Tarreau <w@1wt.eu>
Tue, 12 May 2015 09:57:07 +0000 (11:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 12 May 2015 12:45:02 +0000 (14:45 +0200)
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.

src/checks.c

index 26cccae76002ad922bdc2c63fd9379cf26b7ea31..249df276ce5752b17f4437a4c0d0edd279ef9355 100644 (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);