]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: server: Add QUIC definitions to servers.
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 23 Nov 2020 13:29:28 +0000 (14:29 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Dec 2020 10:57:26 +0000 (11:57 +0100)
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.

include/haproxy/server-t.h
src/server.c

index 0e66be693f8ee0d49ea7083f9bc510a5b7262d8d..512489a5c52487f46d3b54aa928546a94e96f58d 100644 (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 {
index 15d88de8cf5ca37f555c99e342c9f7af3104c337..8df763be14a5ec1e0773b1b58653c8141c73f123 100644 (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;