From: Frédéric Lécaille Date: Tue, 3 Aug 2021 12:29:03 +0000 (+0200) Subject: MINOR: quic: Store post handshake frame in ->pktns.tx.frms MT_LIST X-Git-Tag: v2.5-dev8~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=522c65ce3933c4a18632f99f26cd687c0fb9a8f0;p=thirdparty%2Fhaproxy.git MINOR: quic: Store post handshake frame in ->pktns.tx.frms MT_LIST We want to treat all the frames to be built the same way as frames built during handshake (CRYPTO frames). So, let't store them at the same place which is an MT_LIST. --- diff --git a/src/xprt_quic.c b/src/xprt_quic.c index f520a9b178..90761c9f2c 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -2224,37 +2224,39 @@ int qc_send_ppkts(struct qring *qr, struct ssl_sock_ctx *ctx) * a HANDSHAKE_DONE frame. * Return 1 if succeeded, 0 if not. */ -static int quic_build_post_handshake_frames(struct quic_conn *conn) +static int quic_build_post_handshake_frames(struct quic_conn *qc) { int i; + struct quic_enc_level *qel; struct quic_frame *frm; + qel = &qc->els[QUIC_TLS_ENC_LEVEL_APP]; /* Only servers must send a HANDSHAKE_DONE frame. */ - if (!objt_server(conn->conn->target)) { + if (!objt_server(qc->conn->target)) { frm = pool_alloc(pool_head_quic_frame); if (!frm) return 0; frm->type = QUIC_FT_HANDSHAKE_DONE; - LIST_APPEND(&conn->tx.frms_to_send, &frm->list); + MT_LIST_APPEND(&qel->pktns->tx.frms, &frm->mt_list); } - for (i = 1; i < conn->tx.params.active_connection_id_limit; i++) { + for (i = 1; i < qc->tx.params.active_connection_id_limit; i++) { struct quic_connection_id *cid; frm = pool_alloc(pool_head_quic_frame); - cid = new_quic_cid(&conn->cids, i); + cid = new_quic_cid(&qc->cids, i); if (!frm || !cid) goto err; quic_connection_id_to_frm_cpy(frm, cid); - LIST_APPEND(&conn->tx.frms_to_send, &frm->list); + MT_LIST_APPEND(&qel->pktns->tx.frms, &frm->mt_list); } return 1; err: - free_quic_conn_cids(conn); + free_quic_conn_cids(qc); return 0; }