From: Frédéric Lécaille Date: Tue, 12 Sep 2023 09:51:57 +0000 (+0200) Subject: BUG/MEDIUM: quic: quic_cc_conn ->cntrs counters unreachable X-Git-Tag: v2.9-dev6~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=84757e32e6b8f46460dabefa7fa7bb7daae15680;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/include/haproxy/quic_conn-t.h b/include/haproxy/quic_conn-t.h index 92d1323cad..5373d42f72 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;