]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: fix closing state on NO_ERROR code sent
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 13 Jul 2022 13:08:23 +0000 (15:08 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 13 Jul 2022 13:33:15 +0000 (15:33 +0200)
Reception is disabled as soon as a CONNECTION_CLOSE emission is
required. An early return is done on qc_lstnr_pkt_rcv() to implement
this.

This condition is not functional if the error code sent is NO_ERROR
(0x00). To fix this, check the quic-conn flags instead of the
error code.

Currently this bug has no impact has NO_ERROR emission is not used.

This can be backported up to 2.6.

src/xprt_quic.c

index 34fc13e73a8caf41c0de78679ad4590f5b1a8d28..88cf4fded664c103dcb53493715760a60f3835e8 100644 (file)
@@ -5571,7 +5571,7 @@ static void qc_lstnr_pkt_rcv(unsigned char *buf, const unsigned char *end,
 
        dgram->qc = qc;
 
-       if (qc->err_code) {
+       if (qc->flags & QUIC_FL_CONN_IMMEDIATE_CLOSE) {
                TRACE_PROTO("Connection error",
                            QUIC_EV_CONN_LPKT, qc, NULL, NULL, qv);
                goto out;