mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-16 16:31:26 +01:00
MEDIUM: connection: use CO_FL_WAIT_XPRT more consistently than L4/L6/HANDSHAKE
As mentioned in commit c192b0ab95 ("MEDIUM: connection: remove
CO_FL_CONNECTED and only rely on CO_FL_WAIT_*"), there is a lack of
consistency on which flags are checked among L4/L6/HANDSHAKE depending
on the code areas. A number of sample fetch functions only check for
L4L6 to report MAY_CHANGE, some places only check for HANDSHAKE and
many check both L4L6 and HANDSHAKE.
This patch starts to make all of this more consistent by introducing a
new mask CO_FL_WAIT_XPRT which is the union of L4/L6/HANDSHAKE and
reports whether the transport layer is ready or not.
All inconsistent call places were updated to rely on this one each time
the goal was to check for the readiness of the transport layer.
This commit is contained in:
parent
4450b587dd
commit
911db9bd29
@ -192,6 +192,7 @@ enum {
|
|||||||
|
|
||||||
/* below we have all handshake flags grouped into one */
|
/* below we have all handshake flags grouped into one */
|
||||||
CO_FL_HANDSHAKE = CO_FL_SEND_PROXY | CO_FL_ACCEPT_PROXY | CO_FL_ACCEPT_CIP | CO_FL_SOCKS4_SEND | CO_FL_SOCKS4_RECV,
|
CO_FL_HANDSHAKE = CO_FL_SEND_PROXY | CO_FL_ACCEPT_PROXY | CO_FL_ACCEPT_CIP | CO_FL_SOCKS4_SEND | CO_FL_SOCKS4_RECV,
|
||||||
|
CO_FL_WAIT_XPRT = CO_FL_WAIT_L4_CONN | CO_FL_HANDSHAKE | CO_FL_WAIT_L6_CONN,
|
||||||
|
|
||||||
CO_FL_SSL_WAIT_HS = 0x08000000, /* wait for an SSL handshake to complete */
|
CO_FL_SSL_WAIT_HS = 0x08000000, /* wait for an SSL handshake to complete */
|
||||||
|
|
||||||
|
|||||||
@ -626,7 +626,7 @@ int assign_server(struct stream *s)
|
|||||||
tmpsrv->nbpend + 1 < s->be->max_ka_queue))) &&
|
tmpsrv->nbpend + 1 < s->be->max_ka_queue))) &&
|
||||||
srv_currently_usable(tmpsrv)) {
|
srv_currently_usable(tmpsrv)) {
|
||||||
list_for_each_entry(conn, &srv_list->conn_list, session_list) {
|
list_for_each_entry(conn, &srv_list->conn_list, session_list) {
|
||||||
if (!(conn->flags & CO_FL_WAIT_L4L6)) {
|
if (!(conn->flags & CO_FL_WAIT_XPRT)) {
|
||||||
srv = tmpsrv;
|
srv = tmpsrv;
|
||||||
s->target = &srv->obj_type;
|
s->target = &srv->obj_type;
|
||||||
goto out_ok;
|
goto out_ok;
|
||||||
@ -1220,7 +1220,7 @@ int connect_server(struct stream *s)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((!reuse || (srv_conn && (srv_conn->flags & CO_FL_WAIT_L4L6)))
|
if (((!reuse || (srv_conn && (srv_conn->flags & CO_FL_WAIT_XPRT)))
|
||||||
&& ha_used_fds > global.tune.pool_high_count) && srv && srv->idle_orphan_conns) {
|
&& ha_used_fds > global.tune.pool_high_count) && srv && srv->idle_orphan_conns) {
|
||||||
struct connection *tokill_conn;
|
struct connection *tokill_conn;
|
||||||
|
|
||||||
@ -1934,7 +1934,7 @@ void back_handle_st_con(struct stream *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* first, let's see if we've made any progress on this connection */
|
/* first, let's see if we've made any progress on this connection */
|
||||||
if (!conn->mux && !(conn->flags & CO_FL_WAIT_L4L6)) {
|
if (!conn->mux && !(conn->flags & CO_FL_WAIT_XPRT)) {
|
||||||
/* connection finished to set up */
|
/* connection finished to set up */
|
||||||
struct server *srv;
|
struct server *srv;
|
||||||
|
|
||||||
|
|||||||
16
src/checks.c
16
src/checks.c
@ -886,7 +886,7 @@ static void __event_srv_chk_r(struct conn_stream *cs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* the rest of the code below expects the connection to be ready! */
|
/* the rest of the code below expects the connection to be ready! */
|
||||||
if (conn->flags & CO_FL_WAIT_L4L6 && !done)
|
if (conn->flags & CO_FL_WAIT_XPRT && !done)
|
||||||
goto wait_more_data;
|
goto wait_more_data;
|
||||||
|
|
||||||
/* Intermediate or complete response received.
|
/* Intermediate or complete response received.
|
||||||
@ -1392,7 +1392,7 @@ static void __event_srv_chk_r(struct conn_stream *cs)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
/* good connection is enough for pure TCP check */
|
/* good connection is enough for pure TCP check */
|
||||||
if (!(conn->flags & CO_FL_WAIT_L4L6) && !check->type) {
|
if (!(conn->flags & CO_FL_WAIT_XPRT) && !check->type) {
|
||||||
if (check->use_ssl)
|
if (check->use_ssl)
|
||||||
set_server_check_status(check, HCHK_STATUS_L6OK, NULL);
|
set_server_check_status(check, HCHK_STATUS_L6OK, NULL);
|
||||||
else
|
else
|
||||||
@ -1477,7 +1477,7 @@ static int wake_srv_chk(struct conn_stream *cs)
|
|||||||
chk_report_conn_err(check, errno, 0);
|
chk_report_conn_err(check, errno, 0);
|
||||||
task_wakeup(check->task, TASK_WOKEN_IO);
|
task_wakeup(check->task, TASK_WOKEN_IO);
|
||||||
}
|
}
|
||||||
else if (!(conn->flags & CO_FL_HANDSHAKE) && !check->type) {
|
else if (!(conn->flags & CO_FL_WAIT_XPRT) && !check->type) {
|
||||||
/* we may get here if only a connection probe was required : we
|
/* we may get here if only a connection probe was required : we
|
||||||
* don't have any data to send nor anything expected in response,
|
* don't have any data to send nor anything expected in response,
|
||||||
* so the completion of the connection establishment is enough.
|
* so the completion of the connection establishment is enough.
|
||||||
@ -2285,7 +2285,7 @@ static struct task *process_chk_conn(struct task *t, void *context, unsigned sho
|
|||||||
* sending since otherwise we won't be woken up.
|
* sending since otherwise we won't be woken up.
|
||||||
*/
|
*/
|
||||||
__event_srv_chk_w(cs);
|
__event_srv_chk_w(cs);
|
||||||
if (!(conn->flags & CO_FL_WAIT_L4_CONN) ||
|
if (!(conn->flags & CO_FL_WAIT_XPRT) ||
|
||||||
!(check->wait_list.events & SUB_RETRY_SEND))
|
!(check->wait_list.events & SUB_RETRY_SEND))
|
||||||
__event_srv_chk_r(cs);
|
__event_srv_chk_r(cs);
|
||||||
}
|
}
|
||||||
@ -2352,7 +2352,7 @@ static struct task *process_chk_conn(struct task *t, void *context, unsigned sho
|
|||||||
*/
|
*/
|
||||||
if (check->result == CHK_RES_UNKNOWN) {
|
if (check->result == CHK_RES_UNKNOWN) {
|
||||||
/* good connection is enough for pure TCP check */
|
/* good connection is enough for pure TCP check */
|
||||||
if (!(conn->flags & CO_FL_WAIT_L4L6) && !check->type) {
|
if (!(conn->flags & CO_FL_WAIT_XPRT) && !check->type) {
|
||||||
if (check->use_ssl)
|
if (check->use_ssl)
|
||||||
set_server_check_status(check, HCHK_STATUS_L6OK, NULL);
|
set_server_check_status(check, HCHK_STATUS_L6OK, NULL);
|
||||||
else
|
else
|
||||||
@ -2785,7 +2785,7 @@ static int tcpcheck_main(struct check *check)
|
|||||||
next = LIST_NEXT(&next->list, struct tcpcheck_rule *, list);
|
next = LIST_NEXT(&next->list, struct tcpcheck_rule *, list);
|
||||||
|
|
||||||
if ((check->current_step || &next->list == head) &&
|
if ((check->current_step || &next->list == head) &&
|
||||||
(conn->flags & (CO_FL_WAIT_L4L6 | CO_FL_HANDSHAKE))) {
|
(conn->flags & CO_FL_WAIT_XPRT)) {
|
||||||
/* we allow up to min(inter, timeout.connect) for a connection
|
/* we allow up to min(inter, timeout.connect) for a connection
|
||||||
* to establish but only when timeout.check is set
|
* to establish but only when timeout.check is set
|
||||||
* as it may be to short for a full check otherwise
|
* as it may be to short for a full check otherwise
|
||||||
@ -3034,7 +3034,7 @@ static int tcpcheck_main(struct check *check)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
/* don't do anything until the connection is established */
|
/* don't do anything until the connection is established */
|
||||||
if (conn->flags & CO_FL_WAIT_L4L6)
|
if (conn->flags & CO_FL_WAIT_XPRT)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
} /* end 'connect' */
|
} /* end 'connect' */
|
||||||
@ -3233,7 +3233,7 @@ static int tcpcheck_main(struct check *check)
|
|||||||
} /* end loop over double chained step list */
|
} /* end loop over double chained step list */
|
||||||
|
|
||||||
/* don't do anything until the connection is established */
|
/* don't do anything until the connection is established */
|
||||||
if (conn->flags & CO_FL_WAIT_L4L6) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
/* update expire time, should be done by process_chk */
|
/* update expire time, should be done by process_chk */
|
||||||
/* we allow up to min(inter, timeout.connect) for a connection
|
/* we allow up to min(inter, timeout.connect) for a connection
|
||||||
* to establish but only when timeout.check is set
|
* to establish but only when timeout.check is set
|
||||||
|
|||||||
@ -136,7 +136,7 @@ void conn_fd_handler(int fd)
|
|||||||
* informations to create one, typically from the ALPN. If we're
|
* informations to create one, typically from the ALPN. If we're
|
||||||
* done with the handshake, attempt to create one.
|
* done with the handshake, attempt to create one.
|
||||||
*/
|
*/
|
||||||
if (unlikely(!conn->mux) && !(conn->flags & CO_FL_HANDSHAKE))
|
if (unlikely(!conn->mux) && !(conn->flags & CO_FL_WAIT_XPRT))
|
||||||
if (conn_create_mux(conn) < 0)
|
if (conn_create_mux(conn) < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -155,9 +155,8 @@ void conn_fd_handler(int fd)
|
|||||||
* Note that the wake callback is allowed to release the connection and
|
* Note that the wake callback is allowed to release the connection and
|
||||||
* the fd (and return < 0 in this case).
|
* the fd (and return < 0 in this case).
|
||||||
*/
|
*/
|
||||||
if ((io_available || (((conn->flags ^ flags) & CO_FL_NOTIFY_DONE) ||
|
if ((io_available || ((conn->flags ^ flags) & CO_FL_NOTIFY_DONE) ||
|
||||||
((flags & (CO_FL_WAIT_L4L6|CO_FL_HANDSHAKE)) &&
|
((flags & CO_FL_WAIT_XPRT) && !(conn->flags & CO_FL_WAIT_XPRT))) &&
|
||||||
(conn->flags & (CO_FL_WAIT_L4L6|CO_FL_HANDSHAKE)) == 0))) &&
|
|
||||||
conn->mux && conn->mux->wake && conn->mux->wake(conn) < 0)
|
conn->mux && conn->mux->wake && conn->mux->wake(conn) < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1530,7 +1529,7 @@ int smp_fetch_fc_rcvd_proxy(const struct arg *args, struct sample *smp, const ch
|
|||||||
if (!conn)
|
if (!conn)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L4L6) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags |= SMP_F_MAY_CHANGE;
|
smp->flags |= SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1551,7 +1550,7 @@ int smp_fetch_fc_pp_authority(const struct arg *args, struct sample *smp, const
|
|||||||
if (!conn)
|
if (!conn)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L4L6) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags |= SMP_F_MAY_CHANGE;
|
smp->flags |= SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2770,7 +2770,7 @@ static int fcgi_send(struct fcgi_conn *fconn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (conn->flags & (CO_FL_HANDSHAKE|CO_FL_WAIT_L4_CONN|CO_FL_WAIT_L6_CONN)) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
/* a handshake was requested */
|
/* a handshake was requested */
|
||||||
goto schedule;
|
goto schedule;
|
||||||
}
|
}
|
||||||
@ -2954,7 +2954,7 @@ static int fcgi_process(struct fcgi_conn *fconn)
|
|||||||
* any stream that was waiting for it.
|
* any stream that was waiting for it.
|
||||||
*/
|
*/
|
||||||
if (!(fconn->flags & FCGI_CF_WAIT_FOR_HS) &&
|
if (!(fconn->flags & FCGI_CF_WAIT_FOR_HS) &&
|
||||||
(conn->flags & (CO_FL_EARLY_SSL_HS | CO_FL_HANDSHAKE | CO_FL_EARLY_DATA)) == CO_FL_EARLY_DATA) {
|
(conn->flags & (CO_FL_EARLY_SSL_HS | CO_FL_WAIT_XPRT | CO_FL_EARLY_DATA)) == CO_FL_EARLY_DATA) {
|
||||||
struct eb32_node *node;
|
struct eb32_node *node;
|
||||||
struct fcgi_strm *fstrm;
|
struct fcgi_strm *fstrm;
|
||||||
|
|
||||||
@ -3016,7 +3016,7 @@ static int fcgi_ctl(struct connection *conn, enum mux_ctl_type mux_ctl, void *ou
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
switch (mux_ctl) {
|
switch (mux_ctl) {
|
||||||
case MUX_STATUS:
|
case MUX_STATUS:
|
||||||
if (!(conn->flags & CO_FL_WAIT_L4L6))
|
if (!(conn->flags & CO_FL_WAIT_XPRT))
|
||||||
ret |= MUX_STATUS_READY;
|
ret |= MUX_STATUS_READY;
|
||||||
return ret;
|
return ret;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@ -2667,7 +2667,7 @@ static size_t h1_snd_buf(struct conn_stream *cs, struct buffer *buf, size_t coun
|
|||||||
* now, as we don't want to remove everything from the channel buffer
|
* now, as we don't want to remove everything from the channel buffer
|
||||||
* before we're sure we can send it.
|
* before we're sure we can send it.
|
||||||
*/
|
*/
|
||||||
if (h1c->conn->flags & (CO_FL_WAIT_L4L6|CO_FL_HANDSHAKE)) {
|
if (h1c->conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
TRACE_LEAVE(H1_EV_STRM_SEND, h1c->conn, h1s);
|
TRACE_LEAVE(H1_EV_STRM_SEND, h1c->conn, h1s);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -2781,7 +2781,7 @@ static int h1_ctl(struct connection *conn, enum mux_ctl_type mux_ctl, void *outp
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
switch (mux_ctl) {
|
switch (mux_ctl) {
|
||||||
case MUX_STATUS:
|
case MUX_STATUS:
|
||||||
if (!(conn->flags & CO_FL_WAIT_L4L6))
|
if (!(conn->flags & CO_FL_WAIT_XPRT))
|
||||||
ret |= MUX_STATUS_READY;
|
ret |= MUX_STATUS_READY;
|
||||||
return ret;
|
return ret;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@ -3425,7 +3425,7 @@ static int h2_send(struct h2c *h2c)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conn->flags & (CO_FL_HANDSHAKE|CO_FL_WAIT_L4_CONN|CO_FL_WAIT_L6_CONN)) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
/* a handshake was requested */
|
/* a handshake was requested */
|
||||||
goto schedule;
|
goto schedule;
|
||||||
}
|
}
|
||||||
@ -3578,7 +3578,7 @@ static int h2_process(struct h2c *h2c)
|
|||||||
* any stream that was waiting for it.
|
* any stream that was waiting for it.
|
||||||
*/
|
*/
|
||||||
if (!(h2c->flags & H2_CF_WAIT_FOR_HS) &&
|
if (!(h2c->flags & H2_CF_WAIT_FOR_HS) &&
|
||||||
(conn->flags & (CO_FL_EARLY_SSL_HS | CO_FL_HANDSHAKE | CO_FL_EARLY_DATA)) == CO_FL_EARLY_DATA) {
|
(conn->flags & (CO_FL_EARLY_SSL_HS | CO_FL_WAIT_XPRT | CO_FL_EARLY_DATA)) == CO_FL_EARLY_DATA) {
|
||||||
struct eb32_node *node;
|
struct eb32_node *node;
|
||||||
struct h2s *h2s;
|
struct h2s *h2s;
|
||||||
|
|
||||||
|
|||||||
@ -150,7 +150,7 @@ static int mux_pt_wake(struct connection *conn)
|
|||||||
/* If we had early data, and we're done with the handshake
|
/* If we had early data, and we're done with the handshake
|
||||||
* then whe know the data are safe, and we can remove the flag.
|
* then whe know the data are safe, and we can remove the flag.
|
||||||
*/
|
*/
|
||||||
if ((conn->flags & (CO_FL_EARLY_DATA | CO_FL_EARLY_SSL_HS | CO_FL_HANDSHAKE)) ==
|
if ((conn->flags & (CO_FL_EARLY_DATA | CO_FL_EARLY_SSL_HS | CO_FL_WAIT_XPRT)) ==
|
||||||
CO_FL_EARLY_DATA)
|
CO_FL_EARLY_DATA)
|
||||||
conn->flags &= ~CO_FL_EARLY_DATA;
|
conn->flags &= ~CO_FL_EARLY_DATA;
|
||||||
return ret;
|
return ret;
|
||||||
@ -348,7 +348,7 @@ static int mux_pt_ctl(struct connection *conn, enum mux_ctl_type mux_ctl, void *
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
switch (mux_ctl) {
|
switch (mux_ctl) {
|
||||||
case MUX_STATUS:
|
case MUX_STATUS:
|
||||||
if (!(conn->flags & CO_FL_WAIT_L4L6))
|
if (!(conn->flags & CO_FL_WAIT_XPRT))
|
||||||
ret |= MUX_STATUS_READY;
|
ret |= MUX_STATUS_READY;
|
||||||
return ret;
|
return ret;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@ -270,7 +270,7 @@ int session_accept_fd(struct listener *l, int cfd, struct sockaddr_storage *addr
|
|||||||
* v | | |
|
* v | | |
|
||||||
* conn -- owner ---> task <-----+
|
* conn -- owner ---> task <-----+
|
||||||
*/
|
*/
|
||||||
if (cli_conn->flags & (CO_FL_HANDSHAKE | CO_FL_EARLY_SSL_HS)) {
|
if (cli_conn->flags & (CO_FL_WAIT_XPRT | CO_FL_EARLY_SSL_HS)) {
|
||||||
if (unlikely((sess->task = task_new(tid_bit)) == NULL))
|
if (unlikely((sess->task = task_new(tid_bit)) == NULL))
|
||||||
goto out_free_sess;
|
goto out_free_sess;
|
||||||
|
|
||||||
|
|||||||
@ -6517,7 +6517,7 @@ static size_t ssl_sock_to_buf(struct connection *conn, void *xprt_ctx, struct bu
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (conn->flags & (CO_FL_HANDSHAKE | CO_FL_SSL_WAIT_HS))
|
if (conn->flags & (CO_FL_WAIT_XPRT | CO_FL_SSL_WAIT_HS))
|
||||||
/* a handshake was requested */
|
/* a handshake was requested */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -6628,7 +6628,7 @@ static size_t ssl_sock_from_buf(struct connection *conn, void *xprt_ctx, const s
|
|||||||
if (!ctx)
|
if (!ctx)
|
||||||
goto out_error;
|
goto out_error;
|
||||||
|
|
||||||
if (conn->flags & (CO_FL_HANDSHAKE | CO_FL_SSL_WAIT_HS | CO_FL_EARLY_SSL_HS))
|
if (conn->flags & (CO_FL_WAIT_XPRT | CO_FL_SSL_WAIT_HS | CO_FL_EARLY_SSL_HS))
|
||||||
/* a handshake was requested */
|
/* a handshake was requested */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -6830,7 +6830,7 @@ static void ssl_sock_shutw(struct connection *conn, void *xprt_ctx, int clean)
|
|||||||
{
|
{
|
||||||
struct ssl_sock_ctx *ctx = xprt_ctx;
|
struct ssl_sock_ctx *ctx = xprt_ctx;
|
||||||
|
|
||||||
if (conn->flags & (CO_FL_HANDSHAKE | CO_FL_SSL_WAIT_HS))
|
if (conn->flags & (CO_FL_WAIT_XPRT | CO_FL_SSL_WAIT_HS))
|
||||||
return;
|
return;
|
||||||
if (!clean)
|
if (!clean)
|
||||||
/* don't sent notify on SSL_shutdown */
|
/* don't sent notify on SSL_shutdown */
|
||||||
@ -7411,7 +7411,7 @@ smp_fetch_ssl_fc_has_crt(const struct arg *args, struct sample *smp, const char
|
|||||||
|
|
||||||
ctx = conn->xprt_ctx;
|
ctx = conn->xprt_ctx;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L6_CONN) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags |= SMP_F_MAY_CHANGE;
|
smp->flags |= SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -7442,7 +7442,7 @@ smp_fetch_ssl_x_der(const struct arg *args, struct sample *smp, const char *kw,
|
|||||||
return 0;
|
return 0;
|
||||||
ctx = conn->xprt_ctx;
|
ctx = conn->xprt_ctx;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L6_CONN) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags |= SMP_F_MAY_CHANGE;
|
smp->flags |= SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -7489,7 +7489,7 @@ smp_fetch_ssl_x_serial(const struct arg *args, struct sample *smp, const char *k
|
|||||||
|
|
||||||
ctx = conn->xprt_ctx;
|
ctx = conn->xprt_ctx;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L6_CONN) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags |= SMP_F_MAY_CHANGE;
|
smp->flags |= SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -7536,7 +7536,7 @@ smp_fetch_ssl_x_sha1(const struct arg *args, struct sample *smp, const char *kw,
|
|||||||
return 0;
|
return 0;
|
||||||
ctx = conn->xprt_ctx;
|
ctx = conn->xprt_ctx;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L6_CONN) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags |= SMP_F_MAY_CHANGE;
|
smp->flags |= SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -7582,7 +7582,7 @@ smp_fetch_ssl_x_notafter(const struct arg *args, struct sample *smp, const char
|
|||||||
return 0;
|
return 0;
|
||||||
ctx = conn->xprt_ctx;
|
ctx = conn->xprt_ctx;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L6_CONN) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags |= SMP_F_MAY_CHANGE;
|
smp->flags |= SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -7628,7 +7628,7 @@ smp_fetch_ssl_x_i_dn(const struct arg *args, struct sample *smp, const char *kw,
|
|||||||
return 0;
|
return 0;
|
||||||
ctx = conn->xprt_ctx;
|
ctx = conn->xprt_ctx;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L6_CONN) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags |= SMP_F_MAY_CHANGE;
|
smp->flags |= SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -7690,7 +7690,7 @@ smp_fetch_ssl_x_notbefore(const struct arg *args, struct sample *smp, const char
|
|||||||
return 0;
|
return 0;
|
||||||
ctx = conn->xprt_ctx;
|
ctx = conn->xprt_ctx;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L6_CONN) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags |= SMP_F_MAY_CHANGE;
|
smp->flags |= SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -7736,7 +7736,7 @@ smp_fetch_ssl_x_s_dn(const struct arg *args, struct sample *smp, const char *kw,
|
|||||||
return 0;
|
return 0;
|
||||||
ctx = conn->xprt_ctx;
|
ctx = conn->xprt_ctx;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L6_CONN) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags |= SMP_F_MAY_CHANGE;
|
smp->flags |= SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -7792,7 +7792,7 @@ smp_fetch_ssl_c_used(const struct arg *args, struct sample *smp, const char *kw,
|
|||||||
return 0;
|
return 0;
|
||||||
ctx = conn->xprt_ctx;
|
ctx = conn->xprt_ctx;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L6_CONN) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags |= SMP_F_MAY_CHANGE;
|
smp->flags |= SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -7825,7 +7825,7 @@ smp_fetch_ssl_x_version(const struct arg *args, struct sample *smp, const char *
|
|||||||
return 0;
|
return 0;
|
||||||
ctx = conn->xprt_ctx;
|
ctx = conn->xprt_ctx;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L6_CONN) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags |= SMP_F_MAY_CHANGE;
|
smp->flags |= SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -7865,7 +7865,7 @@ smp_fetch_ssl_x_sig_alg(const struct arg *args, struct sample *smp, const char *
|
|||||||
return 0;
|
return 0;
|
||||||
ctx = conn->xprt_ctx;
|
ctx = conn->xprt_ctx;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L6_CONN) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags |= SMP_F_MAY_CHANGE;
|
smp->flags |= SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -7917,7 +7917,7 @@ smp_fetch_ssl_x_key_alg(const struct arg *args, struct sample *smp, const char *
|
|||||||
return 0;
|
return 0;
|
||||||
ctx = conn->xprt_ctx;
|
ctx = conn->xprt_ctx;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L6_CONN) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags |= SMP_F_MAY_CHANGE;
|
smp->flags |= SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -8397,7 +8397,7 @@ smp_fetch_ssl_fc_unique_id(const struct arg *args, struct sample *smp, const cha
|
|||||||
return 0;
|
return 0;
|
||||||
ctx = conn->xprt_ctx;
|
ctx = conn->xprt_ctx;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L6_CONN) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags |= SMP_F_MAY_CHANGE;
|
smp->flags |= SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -8435,7 +8435,7 @@ smp_fetch_ssl_c_ca_err(const struct arg *args, struct sample *smp, const char *k
|
|||||||
return 0;
|
return 0;
|
||||||
ctx = conn->xprt_ctx;
|
ctx = conn->xprt_ctx;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L6_CONN) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags = SMP_F_MAY_CHANGE;
|
smp->flags = SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -8458,7 +8458,7 @@ smp_fetch_ssl_c_ca_err_depth(const struct arg *args, struct sample *smp, const c
|
|||||||
if (!conn || conn->xprt != &ssl_sock)
|
if (!conn || conn->xprt != &ssl_sock)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L6_CONN) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags = SMP_F_MAY_CHANGE;
|
smp->flags = SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -8482,7 +8482,7 @@ smp_fetch_ssl_c_err(const struct arg *args, struct sample *smp, const char *kw,
|
|||||||
if (!conn || conn->xprt != &ssl_sock)
|
if (!conn || conn->xprt != &ssl_sock)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L6_CONN) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags = SMP_F_MAY_CHANGE;
|
smp->flags = SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -8507,7 +8507,7 @@ smp_fetch_ssl_c_verify(const struct arg *args, struct sample *smp, const char *k
|
|||||||
if (!conn || conn->xprt != &ssl_sock)
|
if (!conn || conn->xprt != &ssl_sock)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_L6_CONN) {
|
if (conn->flags & CO_FL_WAIT_XPRT) {
|
||||||
smp->flags = SMP_F_MAY_CHANGE;
|
smp->flags = SMP_F_MAY_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -451,7 +451,7 @@ static void stream_int_notify(struct stream_interface *si)
|
|||||||
struct connection *conn = objt_cs(si->end) ? objt_cs(si->end)->conn : NULL;
|
struct connection *conn = objt_cs(si->end) ? objt_cs(si->end)->conn : NULL;
|
||||||
|
|
||||||
if (((oc->flags & (CF_SHUTW|CF_SHUTW_NOW)) == CF_SHUTW_NOW) &&
|
if (((oc->flags & (CF_SHUTW|CF_SHUTW_NOW)) == CF_SHUTW_NOW) &&
|
||||||
(si->state == SI_ST_EST) && (!conn || !(conn->flags & (CO_FL_HANDSHAKE | CO_FL_EARLY_SSL_HS))))
|
(si->state == SI_ST_EST) && (!conn || !(conn->flags & (CO_FL_WAIT_XPRT | CO_FL_EARLY_SSL_HS))))
|
||||||
si_shutw(si);
|
si_shutw(si);
|
||||||
oc->wex = TICK_ETERNITY;
|
oc->wex = TICK_ETERNITY;
|
||||||
}
|
}
|
||||||
@ -607,14 +607,14 @@ static int si_cs_process(struct conn_stream *cs)
|
|||||||
* in the event there's an analyser waiting for the end of
|
* in the event there's an analyser waiting for the end of
|
||||||
* the handshake.
|
* the handshake.
|
||||||
*/
|
*/
|
||||||
if (!(conn->flags & (CO_FL_HANDSHAKE | CO_FL_EARLY_SSL_HS)) &&
|
if (!(conn->flags & (CO_FL_WAIT_XPRT | CO_FL_EARLY_SSL_HS)) &&
|
||||||
(cs->flags & CS_FL_WAIT_FOR_HS)) {
|
(cs->flags & CS_FL_WAIT_FOR_HS)) {
|
||||||
cs->flags &= ~CS_FL_WAIT_FOR_HS;
|
cs->flags &= ~CS_FL_WAIT_FOR_HS;
|
||||||
task_wakeup(si_task(si), TASK_WOKEN_MSG);
|
task_wakeup(si_task(si), TASK_WOKEN_MSG);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!si_state_in(si->state, SI_SB_EST|SI_SB_DIS|SI_SB_CLO) &&
|
if (!si_state_in(si->state, SI_SB_EST|SI_SB_DIS|SI_SB_CLO) &&
|
||||||
(conn->flags & (CO_FL_WAIT_L4L6 | CO_FL_HANDSHAKE)) == 0) {
|
(conn->flags & CO_FL_WAIT_XPRT) == 0) {
|
||||||
si->exp = TICK_ETERNITY;
|
si->exp = TICK_ETERNITY;
|
||||||
oc->flags |= CF_WRITE_NULL;
|
oc->flags |= CF_WRITE_NULL;
|
||||||
if (si->state == SI_ST_CON)
|
if (si->state == SI_ST_CON)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user