mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-27 11:52:34 -04:00
MINOR: session: support QMux in clear on FE side
Activates xprt_qmux layer if necessary via session_accept_fd(). This is necessary to be able to support QMux in clear. This operation is noop if SSL is active, as in this case xprt_qmux will be activated after the SSL handshake completion. To ensure MUX init is delayed when running with clear QMux, mask CO_FL_WAIT_XPRT_L6 is added to test if the embryonic task must be started instead.
This commit is contained in:
parent
8fe8f78473
commit
812962d110
1 changed files with 7 additions and 4 deletions
|
|
@ -241,14 +241,17 @@ int session_accept_fd(struct connection *cli_conn)
|
|||
if (l->bind_conf->options & BC_O_ACC_CIP)
|
||||
cli_conn->flags |= CO_FL_ACCEPT_CIP;
|
||||
|
||||
if (l->bind_conf->mux_proto && l->bind_conf->mux_proto->init_xprt == XPRT_QMUX)
|
||||
cli_conn->flags |= (CO_FL_QMUX_RECV|CO_FL_QMUX_SEND);
|
||||
|
||||
/* Add the handshake pseudo-XPRT */
|
||||
if (cli_conn->flags & (CO_FL_ACCEPT_PROXY | CO_FL_ACCEPT_CIP)) {
|
||||
if (xprt_add_hs(cli_conn) != 0)
|
||||
goto out_free_conn;
|
||||
}
|
||||
|
||||
/* Add handshake layer prior to MUX init if required. Does nothing if SSL layer is active though. */
|
||||
if (l->bind_conf->mux_proto && l->bind_conf->mux_proto->init_xprt) {
|
||||
if (xprt_add_l6hs(cli_conn, l->bind_conf->mux_proto->init_xprt))
|
||||
goto out_free_conn;
|
||||
}
|
||||
}
|
||||
|
||||
/* Reversed conns already have an assigned session, do not recreate it. */
|
||||
|
|
@ -351,7 +354,7 @@ int session_accept_fd(struct connection *cli_conn)
|
|||
* v | | |
|
||||
* conn -- owner ---> task <-----+
|
||||
*/
|
||||
if (cli_conn->flags & (CO_FL_WAIT_XPRT | CO_FL_EARLY_SSL_HS)) {
|
||||
if (cli_conn->flags & (CO_FL_WAIT_XPRT | CO_FL_EARLY_SSL_HS | CO_FL_WAIT_XPRT_L6)) {
|
||||
int timeout;
|
||||
int clt_tmt = p->timeout.client;
|
||||
int hs_tmt = p->timeout.client_hs;
|
||||
|
|
|
|||
Loading…
Reference in a new issue