MINOR: quic: Do not wakeup the I/O handler before the mux is started
If we wakeup the I/O handler before the mux is started, it is possible
it has enough time to parse the ClientHello TLS message and update the
mux transport parameters, leading to a crash.
So, we initialize ->qcc quic_conn struct member at the very last time,
when the mux if fully initialized. The condition to wakeup the I/O handler
from lstnr_rcv_pkt() is: xprt context and mux both initialized.
Note that if the xprt context is initialized, it implies its tasklet is
initialized. So, we do not check anymore this latter condition.
diff --git a/src/mux_quic.c b/src/mux_quic.c
index 9326dc8..2156730 100644
--- a/src/mux_quic.c
+++ b/src/mux_quic.c
@@ -395,7 +395,6 @@
qcc->conn = conn;
conn->ctx = qcc;
- conn->qc->qcc = qcc;
qcc->app_ops = NULL;
@@ -441,6 +440,7 @@
qcc->wait_event.tasklet->process = qc_io_cb;
qcc->wait_event.tasklet->context = qcc;
+ HA_ATOMIC_STORE(&conn->qc->qcc, qcc);
/* init read cycle */
tasklet_wakeup(qcc->wait_event.tasklet);