mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-12-13 05:30:59 +01:00
MEDIUM: quic: Add connection as argument when qc_new_conn() is called
This patch reverts the commit efe60745b ("MINOR: quic: remove connection arg
from qc_new_conn()"). The connection will be mandatory when the QUIC
connection is created on backend side to fix an issue when we try to reuse a
TLS session.
So, the connection is again an argument of qc_new_conn(), the 4th
argument. It is NULL for frontend QUIC connections but there is no special
check on it.
This commit is contained in:
parent
3534efe798
commit
a83ed86b78
@ -67,6 +67,7 @@ int qc_h3_request_reject(struct quic_conn *qc, uint64_t id);
|
||||
struct quic_conn *qc_new_conn(void *target,
|
||||
const struct quic_rx_packet *initial_pkt,
|
||||
const struct quic_cid *token_odcid,
|
||||
struct connection *connection,
|
||||
struct quic_connection_id *conn_id,
|
||||
struct sockaddr_storage *local_addr,
|
||||
struct sockaddr_storage *peer_addr);
|
||||
|
||||
@ -1124,6 +1124,7 @@ struct task *qc_process_timer(struct task *task, void *ctx, unsigned int state)
|
||||
struct quic_conn *qc_new_conn(void *target,
|
||||
const struct quic_rx_packet *initial_pkt,
|
||||
const struct quic_cid *token_odcid,
|
||||
struct connection *conn,
|
||||
struct quic_connection_id *conn_id,
|
||||
struct sockaddr_storage *local_addr,
|
||||
struct sockaddr_storage *peer_addr)
|
||||
@ -1198,7 +1199,7 @@ struct quic_conn *qc_new_conn(void *target,
|
||||
qc->idle_timer_task = NULL;
|
||||
|
||||
qc->xprt_ctx = NULL;
|
||||
qc->conn = NULL;
|
||||
qc->conn = conn;
|
||||
qc->qcc = NULL;
|
||||
qc->app_ops = NULL;
|
||||
qc->path = NULL;
|
||||
|
||||
@ -1834,7 +1834,7 @@ static struct quic_conn *quic_rx_pkt_retrieve_conn(struct quic_rx_packet *pkt,
|
||||
}
|
||||
else {
|
||||
qc = qc_new_conn(l, pkt, &token_odcid,
|
||||
conn_id, &dgram->daddr, &pkt->saddr);
|
||||
NULL, conn_id, &dgram->daddr, &pkt->saddr);
|
||||
if (qc == NULL) {
|
||||
quic_cid_delete(conn_id); /* Removes CID from global tree as it points to a NULL qc. */
|
||||
pool_free(pool_head_quic_connection_id, conn_id);
|
||||
|
||||
@ -165,7 +165,7 @@ static int qc_conn_init(struct connection *conn, void **xprt_ctx)
|
||||
goto out;
|
||||
}
|
||||
|
||||
qc = qc_new_conn(srv, NULL, NULL, conn_id, NULL, &srv->addr);
|
||||
qc = qc_new_conn(srv, NULL, NULL, conn, conn_id, NULL, &srv->addr);
|
||||
if (!qc) {
|
||||
pool_free(pool_head_quic_connection_id, conn_id);
|
||||
goto out;
|
||||
@ -175,7 +175,6 @@ static int qc_conn_init(struct connection *conn, void **xprt_ctx)
|
||||
|
||||
conn->flags |= CO_FL_SSL_WAIT_HS | CO_FL_WAIT_L6_CONN | CO_FL_FDLESS;
|
||||
conn->handle.qc = qc;
|
||||
qc->conn = conn;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user