mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
MINOR: quic: Improve qc_prep_pkts() flexibility
We want to be able to choose the encryption levels to be used by qc_prep_pkts() outside of it.
This commit is contained in:
parent
f7ef97698a
commit
ee2b8b377f
@ -2405,9 +2405,10 @@ static inline void qc_set_dg(struct cbuf *cbuf,
|
||||
* packet in this datagram.
|
||||
* Returns 1 if succeeded, or 0 if something wrong happened.
|
||||
*/
|
||||
static int qc_prep_pkts(struct quic_conn *qc, struct qring *qr)
|
||||
static int qc_prep_pkts(struct quic_conn *qc, struct qring *qr,
|
||||
enum quic_tls_enc_level tel,
|
||||
enum quic_tls_enc_level next_tel)
|
||||
{
|
||||
enum quic_tls_enc_level tel, next_tel;
|
||||
struct quic_enc_level *qel;
|
||||
struct cbuf *cbuf;
|
||||
unsigned char *end_buf, *end, *pos, *spos;
|
||||
@ -2423,11 +2424,6 @@ static int qc_prep_pkts(struct quic_conn *qc, struct qring *qr)
|
||||
|
||||
TRACE_ENTER(QUIC_EV_CONN_PHPKTS, qc);
|
||||
|
||||
if (!quic_get_tls_enc_levels(&tel, &next_tel, HA_ATOMIC_LOAD(&qc->state), 0)) {
|
||||
TRACE_DEVEL("unknown enc. levels", QUIC_EV_CONN_PHPKTS, qc);
|
||||
goto err;
|
||||
}
|
||||
|
||||
start:
|
||||
dglen = 0;
|
||||
total = 0;
|
||||
@ -3142,7 +3138,9 @@ struct task *quic_conn_io_cb(struct task *t, void *context, unsigned int state)
|
||||
|
||||
if (!qr)
|
||||
qr = MT_LIST_POP(qc->tx.qring_list, typeof(qr), mt_list);
|
||||
ret = qc_prep_pkts(qc, qr);
|
||||
if (!quic_get_tls_enc_levels(&tel, &next_tel, st, zero_rtt))
|
||||
goto err;
|
||||
ret = qc_prep_pkts(qc, qr, tel, next_tel);
|
||||
if (ret == -1)
|
||||
goto err;
|
||||
else if (ret == 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user