mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-11 09:37:20 +02:00
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.
This commit is contained in:
parent
546186b1cf
commit
522c65ce39
@ -2224,37 +2224,39 @@ int qc_send_ppkts(struct qring *qr, struct ssl_sock_ctx *ctx)
|
|||||||
* a HANDSHAKE_DONE frame.
|
* a HANDSHAKE_DONE frame.
|
||||||
* Return 1 if succeeded, 0 if not.
|
* 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;
|
int i;
|
||||||
|
struct quic_enc_level *qel;
|
||||||
struct quic_frame *frm;
|
struct quic_frame *frm;
|
||||||
|
|
||||||
|
qel = &qc->els[QUIC_TLS_ENC_LEVEL_APP];
|
||||||
/* Only servers must send a HANDSHAKE_DONE frame. */
|
/* 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);
|
frm = pool_alloc(pool_head_quic_frame);
|
||||||
if (!frm)
|
if (!frm)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
frm->type = QUIC_FT_HANDSHAKE_DONE;
|
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;
|
struct quic_connection_id *cid;
|
||||||
|
|
||||||
frm = pool_alloc(pool_head_quic_frame);
|
frm = pool_alloc(pool_head_quic_frame);
|
||||||
cid = new_quic_cid(&conn->cids, i);
|
cid = new_quic_cid(&qc->cids, i);
|
||||||
if (!frm || !cid)
|
if (!frm || !cid)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
quic_connection_id_to_frm_cpy(frm, cid);
|
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;
|
return 1;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
free_quic_conn_cids(conn);
|
free_quic_conn_cids(qc);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user