MEDIUM: check: add the ctrl and transport layers in the server check structure
Since it's possible for the checks to use a different protocol or transport layer
than the prod traffic, we need to have them referenced in the server. The
SSL checks are not enabled yet, but the transport layers are completely used.
diff --git a/src/checks.c b/src/checks.c
index 211c210..bf77574 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -1375,7 +1375,7 @@
/* prepare a new connection */
set_target_server(&conn->target, s);
- conn_prepare(conn, &check_conn_cb, s->proto, &raw_sock, s);
+ conn_prepare(conn, &check_conn_cb, s->check.proto, s->check.xprt, s);
if (is_addr(&s->check.addr))
/* we'll connect to the check addr specified on the server */
@@ -1395,7 +1395,7 @@
* - SN_ERR_INTERNAL for any other purely internal errors
* Additionnally, in the case of SN_ERR_RESOURCE, an emergency log will be emitted.
*/
- ret = tcp_connect_server(conn, 1);
+ ret = s->check.proto->connect(conn, 1);
conn->flags |= CO_FL_WAKE_DATA;
switch (ret) {