]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: mux-quic: reinsert all streams in by_id tree
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 24 Sep 2021 08:03:16 +0000 (10:03 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 7 Oct 2021 15:35:25 +0000 (17:35 +0200)
It is required that all qcs streams are in the by_id tree for the xprt
to function correctly. Without this, some ACKs are not properly emitted
by xprt.

Note that this change breaks the free of the connection because the
condition eb_is_empty in qc_detach is always true. This will be fixed in
a following patch.

src/mux_quic.c

index c4673ee86fe99a78abd949115131806f82546082..19b021acbf8c323c36a1c8e83414b8a7b5e9569d 100644 (file)
@@ -1030,9 +1030,7 @@ struct qcs *luqs_new(struct qcc *qcc)
 
        qcs->subs = NULL;
        LIST_INIT(&qcs->list);
-       // TODO do not insert luqs into streams_by_id as it prevent to detect
-       // that the connection is dead
-       //eb64_insert(&qcc->streams_by_id, &qcs->by_id);
+       eb64_insert(&qcc->streams_by_id, &qcs->by_id);
 
        TRACE_LEAVE(QC_EV_QCS_NEW, qcc->conn);
        return qcs;
@@ -1074,9 +1072,7 @@ struct qcs *ruqs_new(struct qcc *qcc, uint64_t id)
 
        qcs->subs = NULL;
        LIST_INIT(&qcs->list);
-       // TODO do not insert ruqs into streams_by_id as it prevent to detect
-       // that the connection is dead
-       //eb64_insert(&qcc->streams_by_id, &qcs->by_id);
+       eb64_insert(&qcc->streams_by_id, &qcs->by_id);
 
        TRACE_LEAVE(QC_EV_QCS_NEW, qcc->conn);
        return qcs;