From f16c851625417b0bd5f7aef76b1e4d4cce2bafe6 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Wed, 10 Dec 2025 10:43:36 +0100 Subject: [PATCH] MINOR: quic: abstract stream type in qf_stream frame STREAM frame will also be used by the new QMux protocol. This requires some adaptation in the qf_stream structure. Reference to qc_stream_desc object is replaced by a generic void* pointer. This change is necessary as QMux protocol will not use any qc_stream_desc elements for emission. --- include/haproxy/quic_frame-t.h | 3 +-- src/mux_quic.c | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/haproxy/quic_frame-t.h b/include/haproxy/quic_frame-t.h index 86705e36c..c94aff0f5 100644 --- a/include/haproxy/quic_frame-t.h +++ b/include/haproxy/quic_frame-t.h @@ -32,7 +32,6 @@ #include #include #include -#include #include extern struct pool_head *pool_head_quic_frame; @@ -170,7 +169,7 @@ struct qf_new_token { struct qf_stream { uint64_t id; - struct qc_stream_desc *stream; + void *stream; /* used only on TX when constructing frames. * Data cleared when processing ACK related to this STREAM frame. diff --git a/src/mux_quic.c b/src/mux_quic.c index 1abc8a407..2c36d8d9d 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -2499,7 +2499,8 @@ static int qcs_build_stream_frm(struct qcs *qcs, struct buffer *out, char fin, goto err; } - frm->stream.stream = qcs->tx.stream; + frm->stream.stream = + conn_is_quic(qcc->conn) ? (void *)qcs->tx.stream : (void *)qcs; frm->stream.id = qcs->id; frm->stream.offset = 0; frm->stream.dup = 0;