From: Frederic Lecaille Date: Thu, 12 Jun 2025 08:50:52 +0000 (+0200) Subject: CLEANUP: quic-be: Add comments about qc_new_conn() usage X-Git-Tag: v3.3-dev2~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc3fb3a7318ab3d844db70f55ca2fc51af5dd64e;p=thirdparty%2Fhaproxy.git CLEANUP: quic-be: Add comments about qc_new_conn() usage This patch should have come with this last commit for the last qc_new_conn() modifications for QUIC backends: MINOR: quic-be: get rid of ->li quic_conn member qc_new_conn() must be passed NULL pointers for several variables as mentioned by the comment. Some of these local variables are used to avoid too much code modifications. --- diff --git a/src/quic_conn.c b/src/quic_conn.c index 2cb9fde9f..90c1a1db0 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -1047,7 +1047,7 @@ struct task *qc_process_timer(struct task *task, void *ctx, unsigned int state) /* Allocate a new QUIC connection with as QUIC version. * boolean is set to 1 for IPv4 connection, 0 for IPv6. is set to 1 - * for QUIC servers (or haproxy listeners). + * for QUIC servers (or haproxy listeners), 0 for QUIC clients. * is the destination connection ID, is the source connection ID. * This latter CID as the same value on the wire as the one for * which is the first CID of this connection but a different internal @@ -1060,6 +1060,9 @@ struct task *qc_process_timer(struct task *task, void *ctx, unsigned int state) * into the Retry token sent to the client before instantiated this connection. * Endpoints addresses are specified via and . * Returns the connection if succeeded, NULL if not. + * For QUIC clients, , , , must be null, + * and value must be 0. This is the responsability of the caller to ensure + * this is the case. */ struct quic_conn *qc_new_conn(const struct quic_version *qv, int ipv4, struct quic_cid *dcid, struct quic_cid *scid,