"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/tcpcheck.c" between
haproxy-2.2.1.tar.gz and haproxy-2.2.2.tar.gz

About: HAProxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments.

tcpcheck.c  (haproxy-2.2.1):tcpcheck.c  (haproxy-2.2.2)
skipping to change at line 1093 skipping to change at line 1093
flags |= CONNECT_DELACK_ALWAYS; flags |= CONNECT_DELACK_ALWAYS;
status = proto->connect(conn, flags); status = proto->connect(conn, flags);
} }
if (status != SF_ERR_NONE) if (status != SF_ERR_NONE)
goto fail_check; goto fail_check;
conn->flags |= CO_FL_PRIVATE; conn->flags |= CO_FL_PRIVATE;
conn->ctx = cs; conn->ctx = cs;
/* The mux may be initialized now if there isn't server attached to the
* check (email alerts) or if there is a mux proto specified or if there
* is no alpn.
*/
if (!s || ((connect->options & TCPCHK_OPT_DEFAULT_CONNECT) && check->mux_
proto) ||
connect->mux_proto || (!connect->alpn && !check->alpn_str)) {
const struct mux_ops *mux_ops;
if (connect->mux_proto)
mux_ops = connect->mux_proto->mux;
else if ((connect->options & TCPCHK_OPT_DEFAULT_CONNECT) && check
->mux_proto)
mux_ops = check->mux_proto->mux;
else {
int mode = ((check->tcpcheck_rules->flags & TCPCHK_RULES_
PROTO_CHK) == TCPCHK_RULES_HTTP_CHK
? PROTO_MODE_HTTP
: PROTO_MODE_TCP);
mux_ops = conn_get_best_mux(conn, IST_NULL, PROTO_SIDE_BE
, mode);
}
if (mux_ops && conn_install_mux(conn, mux_ops, cs, proxy, check->
sess) < 0) {
status = SF_ERR_INTERNAL;
goto fail_check;
}
}
#ifdef USE_OPENSSL #ifdef USE_OPENSSL
if (connect->sni) if (connect->sni)
ssl_sock_set_servername(conn, connect->sni); ssl_sock_set_servername(conn, connect->sni);
else if ((connect->options & TCPCHK_OPT_DEFAULT_CONNECT) && s && s->check .sni) else if ((connect->options & TCPCHK_OPT_DEFAULT_CONNECT) && s && s->check .sni)
ssl_sock_set_servername(conn, s->check.sni); ssl_sock_set_servername(conn, s->check.sni);
if (connect->alpn) if (connect->alpn)
ssl_sock_set_alpn(conn, (unsigned char *)connect->alpn, connect-> alpn_len); ssl_sock_set_alpn(conn, (unsigned char *)connect->alpn, connect-> alpn_len);
else if ((connect->options & TCPCHK_OPT_DEFAULT_CONNECT) && s && s->check .alpn_str) else if ((connect->options & TCPCHK_OPT_DEFAULT_CONNECT) && s && s->check .alpn_str)
ssl_sock_set_alpn(conn, (unsigned char *)s->check.alpn_str, s->ch eck.alpn_len); ssl_sock_set_alpn(conn, (unsigned char *)s->check.alpn_str, s->ch eck.alpn_len);
skipping to change at line 1157 skipping to change at line 1132
if (conn_ctrl_ready(conn) && (connect->options & TCPCHK_OPT_LINGER)) { if (conn_ctrl_ready(conn) && (connect->options & TCPCHK_OPT_LINGER)) {
/* Some servers don't like reset on close */ /* Some servers don't like reset on close */
fdtab[cs->conn->handle.fd].linger_risk = 0; fdtab[cs->conn->handle.fd].linger_risk = 0;
} }
if (conn_ctrl_ready(conn) && (conn->flags & (CO_FL_SEND_PROXY | CO_FL_SOC KS4))) { if (conn_ctrl_ready(conn) && (conn->flags & (CO_FL_SEND_PROXY | CO_FL_SOC KS4))) {
if (xprt_add_hs(conn) < 0) if (xprt_add_hs(conn) < 0)
status = SF_ERR_RESOURCE; status = SF_ERR_RESOURCE;
} }
/* The mux may be initialized now if there isn't server attached to the
* check (email alerts) or if there is a mux proto specified or if there
* is no alpn.
*/
if (!s || ((connect->options & TCPCHK_OPT_DEFAULT_CONNECT) && check->mux_
proto) ||
connect->mux_proto || (!connect->alpn && !check->alpn_str)) {
const struct mux_ops *mux_ops;
if (connect->mux_proto)
mux_ops = connect->mux_proto->mux;
else if ((connect->options & TCPCHK_OPT_DEFAULT_CONNECT) && check
->mux_proto)
mux_ops = check->mux_proto->mux;
else {
int mode = ((check->tcpcheck_rules->flags & TCPCHK_RULES_
PROTO_CHK) == TCPCHK_RULES_HTTP_CHK
? PROTO_MODE_HTTP
: PROTO_MODE_TCP);
mux_ops = conn_get_best_mux(conn, IST_NULL, PROTO_SIDE_BE
, mode);
}
if (mux_ops && conn_install_mux(conn, mux_ops, cs, proxy, check->
sess) < 0) {
status = SF_ERR_INTERNAL;
goto fail_check;
}
}
fail_check: fail_check:
/* It can return one of : /* It can return one of :
* - SF_ERR_NONE if everything's OK * - SF_ERR_NONE if everything's OK
* - SF_ERR_SRVTO if there are no more servers * - SF_ERR_SRVTO if there are no more servers
* - SF_ERR_SRVCL if the connection was refused by the server * - SF_ERR_SRVCL if the connection was refused by the server
* - SF_ERR_PRXCOND if the connection has been limited by the proxy (max conn) * - SF_ERR_PRXCOND if the connection has been limited by the proxy (max conn)
* - SF_ERR_RESOURCE if a system resource is lacking (eg: fd limits, por ts, ...) * - SF_ERR_RESOURCE if a system resource is lacking (eg: fd limits, por ts, ...)
* - SF_ERR_INTERNAL for any other purely internal errors * - SF_ERR_INTERNAL for any other purely internal errors
* Additionally, in the case of SF_ERR_RESOURCE, an emergency log will be emitted. * Additionally, in the case of SF_ERR_RESOURCE, an emergency log will be emitted.
* Note that we try to prevent the network stack from sending the ACK dur ing the * Note that we try to prevent the network stack from sending the ACK dur ing the
 End of changes. 2 change blocks. 
30 lines changed or deleted 30 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)