From: Frédéric Lécaille Date: Thu, 19 May 2022 09:58:53 +0000 (+0200) Subject: MINOR: quic: Attach proxy QUIC stats counters to the QUIC connection X-Git-Tag: v2.6-dev11~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a89659a75201f8170511fa1e05bfa1e10ba2f36f;p=thirdparty%2Fhaproxy.git 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 eb9406691f..e259c3f963 100644 --- a/include/haproxy/xprt_quic-t.h +++ b/include/haproxy/xprt_quic-t.h @@ -792,6 +792,7 @@ struct quic_conn { 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 5c9b7f2ce4..e8082acba2 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -4330,8 +4331,13 @@ static struct quic_conn *qc_new_conn(unsigned int version, int ipv4, 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. */