mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
BUG/MINOR: session: Fix tcp-request session failure if handshake.
Some sample fetches check if session is established using the flag CO_FL_CONNECTED. But in some cases, when a handshake is performed this flag is set too late, after the process of the tcp-request session rules. This fix move the raising of the flag at the beginning of the conn_complete_session function which processes the tcp-request session rules. This fix must be backported to 1.8 (and perhaps 1.7)
This commit is contained in:
parent
b684e7a52c
commit
1738e86771
@ -264,8 +264,6 @@ int session_accept_fd(struct listener *l, int cfd, struct sockaddr_storage *addr
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* OK let's complete stream initialization since there is no handshake */
|
/* OK let's complete stream initialization since there is no handshake */
|
||||||
cli_conn->flags |= CO_FL_CONNECTED;
|
|
||||||
|
|
||||||
if (conn_complete_session(cli_conn) >= 0)
|
if (conn_complete_session(cli_conn) >= 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
@ -402,6 +400,10 @@ static int conn_complete_session(struct connection *conn)
|
|||||||
|
|
||||||
conn_clear_xprt_done_cb(conn);
|
conn_clear_xprt_done_cb(conn);
|
||||||
|
|
||||||
|
/* Verify if the connection just established. */
|
||||||
|
if (unlikely(!(conn->flags & (CO_FL_WAIT_L4_CONN | CO_FL_WAIT_L6_CONN | CO_FL_CONNECTED))))
|
||||||
|
conn->flags |= CO_FL_CONNECTED;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_ERROR)
|
if (conn->flags & CO_FL_ERROR)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user