From 84757e32e6b8f46460dabefa7fa7bb7daae15680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Tue, 12 Sep 2023 11:51:57 +0200 Subject: [PATCH] BUG/MEDIUM: quic: quic_cc_conn ->cntrs counters unreachable This bug arrived with this commit in 2.9-dev3: MEDIUM: quic: Allow the quic_conn memory to be asap released. When sending packets from quic_cc_conn_io_cb(), e.g. when the quic_conn object has been released and replaced by a lighter one (quic_cc_conn), some counters may have to be incremented. But they were not reachable because not shared between quic_conn and quic_cc_conn struct. To fix this, one has only to move the ->cntrs counters from quic_conn to QUIC_CONN_COMMON struct which is shared between both quic_cc_conn Thank you to Tristan for having reported this in GH #2247. No need to backport. --- include/haproxy/quic_conn-t.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/haproxy/quic_conn-t.h b/include/haproxy/quic_conn-t.h index 92d1323ca..5373d42f7 100644 --- a/include/haproxy/quic_conn-t.h +++ b/include/haproxy/quic_conn-t.h @@ -499,6 +499,8 @@ struct quic_conn_cntrs { /* Used only to reach the tasklet for the I/O handler from this \ * quic_conn object. \ */ \ + /* QUIC connection level counters */ \ + struct quic_conn_cntrs cntrs; \ struct connection *conn; \ } @@ -584,8 +586,6 @@ struct quic_conn { unsigned int ack_expire; const struct qcc_app_ops *app_ops; - /* QUIC connection level counters */ - struct quic_conn_cntrs cntrs; /* Proxy counters */ struct quic_counters *prx_counters;