void quic_conn_closed_err_count_inc(struct quic_conn *qc, struct quic_frame *frm);
int qc_h3_request_reject(struct quic_conn *qc, uint64_t id);
-struct quic_conn *qc_new_conn(void *target, int ipv4,
+struct quic_conn *qc_new_conn(void *target,
const struct quic_rx_packet *initial_pkt,
const struct quic_cid *token_odcid,
struct quic_connection_id *conn_id,
/* Allocate a new QUIC connection. <target> represents the internal connection
* endpoint, either a listener for a server-side connection or a server on
- * client side. <ipv4> boolean is set to 1 for IPv4 connection or 0 for IPv6.
+ * client side.
*
* On server side, <initial_pkt> must points to the client INITIAL packet which
* initiate this connection allocation. It is used as a source to determine the
*
* Returns the newly allocated quic_conn instance on success or NULL on error.
*/
-struct quic_conn *qc_new_conn(void *target, int ipv4,
+struct quic_conn *qc_new_conn(void *target,
const struct quic_rx_packet *initial_pkt,
const struct quic_cid *token_odcid,
struct quic_connection_id *conn_id,
qc->max_ack_delay = 0;
/* Only one path at this time (multipath not supported) */
qc->path = &qc->paths[0];
- quic_cc_path_init(qc->path, ipv4,
+ quic_cc_path_init(qc->path, peer_addr->ss_family == AF_INET,
l ? l->bind_conf->max_cwnd : quic_tune.be.cc_max_win_size,
cc_algo ? cc_algo : default_quic_cc_algo, qc);
if (!qc) {
struct quic_connection_id *conn_id;
- int ipv4;
/* Reject INITIAL early if listener limits reached. */
if (unlikely(HA_ATOMIC_LOAD(&l->rx.quic_curr_handshake) >=
}
pkt->saddr = dgram->saddr;
- ipv4 = dgram->saddr.ss_family == AF_INET;
conn_id = quic_cid_alloc();
if (!conn_id) {
pool_free(pool_head_quic_connection_id, conn_id);
}
else {
- qc = qc_new_conn(l, ipv4, pkt, &token_odcid,
+ qc = qc_new_conn(l, pkt, &token_odcid,
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. */
}
else {
int retry_rand_cid = 3; /* Number of random retries on CID collision. */
- int ipv4 = conn->dst->ss_family == AF_INET;
struct server *srv = objt_server(conn->target);
conn_id = quic_cid_alloc();
goto out;
}
- qc = qc_new_conn(srv, ipv4, NULL, NULL, conn_id, NULL, &srv->addr);
+ qc = qc_new_conn(srv, NULL, NULL, conn_id, NULL, &srv->addr);
if (!qc) {
pool_free(pool_head_quic_connection_id, conn_id);
goto out;