MINOR: quic: Attach proxy QUIC stats counters to the QUIC connection
Make usage of EXTRA_COUNTERS_GET() do to so from qc_new_conn().
diff --git a/include/haproxy/xprt_quic-t.h b/include/haproxy/xprt_quic-t.h
index eb94066..e259c3f 100644
--- a/include/haproxy/xprt_quic-t.h
+++ b/include/haproxy/xprt_quic-t.h
@@ -792,6 +792,7 @@
const struct qcc_app_ops *app_ops;
unsigned int sendto_err;
+ struct quic_counters *prx_counters;
};
#endif /* USE_QUIC */
diff --git a/src/xprt_quic.c b/src/xprt_quic.c
index 5c9b7f2..e8082ac 100644
--- a/src/xprt_quic.c
+++ b/src/xprt_quic.c
@@ -45,6 +45,7 @@
#include <haproxy/quic_frame.h>
#include <haproxy/quic_loss.h>
#include <haproxy/quic_sock.h>
+#include <haproxy/quic_stats-t.h>
#include <haproxy/quic_stream.h>
#include <haproxy/cbuf.h>
#include <haproxy/proto_quic.h>
@@ -4330,8 +4331,13 @@
qc->cids = EB_ROOT;
/* QUIC Server (or listener). */
if (server) {
+ struct proxy *prx;
+
l = owner;
+ prx = l->bind_conf->frontend;
+ qc->prx_counters = EXTRA_COUNTERS_GET(prx->extra_counters_fe,
+ &quic_stats_module);
qc->flags |= QUIC_FL_CONN_LISTENER;
qc->state = QUIC_HS_ST_SERVER_INITIAL;
/* Copy the initial DCID with the address. */