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.
This commit is contained in:
Frdric Lcaille 2023-09-12 11:51:57 +02:00 committed by Willy Tarreau
parent efc46dede9
commit 84757e32e6
1 changed files with 2 additions and 2 deletions

View File

@ -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;