]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: mux started when releasing quic_conn
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 10 Aug 2023 15:15:21 +0000 (17:15 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Thu, 10 Aug 2023 15:15:21 +0000 (17:15 +0200)
There are cases where the mux is started before the handshake is completed:
during 0-RTT sessions.

So, it was a bad idea to try to release the quic_conn object from quic_conn_io_cb()
without checking if the mux is started.

No need to backport.

src/quic_conn.c

index c0c128a462cf001d2216be34688edec6e09a63c1..ba4ab5ce9a5009dd766b264d0ac35bbb2f53804b 100644 (file)
@@ -970,7 +970,7 @@ struct task *quic_conn_io_cb(struct task *t, void *context, unsigned int state)
                quic_nictx_free(qc);
        }
 
-       if (qc->flags & QUIC_FL_CONN_CLOSING) {
+       if ((qc->flags & QUIC_FL_CONN_CLOSING) && qc->mux_state != QC_MUX_READY) {
                quic_conn_release(qc);
                qc = NULL;
        }