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.
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);
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)
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;
}
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);
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;
conn->flags |= CO_FL_SSL_WAIT_HS | CO_FL_WAIT_L6_CONN | CO_FL_FDLESS;
conn->handle.qc = qc;
- qc->conn = conn;
}
ret = 0;