MINOR: server: Add QUIC definitions to servers.

This patch adds QUIC structs to server struct so that to make the QUIC code
compile. Also initializes the ebtree to store the connections by connection
IDs.
This commit is contained in:
Frdric Lcaille 2020-11-23 14:29:28 +01:00 committed by Willy Tarreau
parent 884f2e9f43
commit f46c10cfb1
2 changed files with 8 additions and 0 deletions

View File

@ -41,6 +41,7 @@
#include <haproxy/stats-t.h>
#include <haproxy/task-t.h>
#include <haproxy/thread-t.h>
#include <haproxy/xprt_quic-t.h>
/* server states. Only SRV_ST_STOPPED indicates a down server. */
@ -329,6 +330,10 @@ struct server {
int alpn_len; /* ALPN protocol string length */
#endif
} ssl_ctx;
#ifdef USE_QUIC
struct quic_transport_params quic_params; /* QUIC transport parameters */
struct eb_root cids; /* QUIC connections IDs. */
#endif
#endif
struct dns_srvrq *srvrq; /* Pointer representing the DNS SRV requeest, if any */
struct {

View File

@ -1742,6 +1742,9 @@ struct server *new_server(struct proxy *proxy)
srv->agent.server = srv;
srv->agent.proxy = proxy;
srv->xprt = srv->check.xprt = srv->agent.xprt = xprt_get(XPRT_RAW);
#if defined(USE_QUIC)
srv->cids = EB_ROOT_UNIQUE;
#endif
srv->extra_counters = NULL;