struct quic_dgram *dgram, struct list **tasklist_head)
{
unsigned char *beg, *payload;
- struct quic_conn *qc, *qc_to_purge = NULL;
+ struct quic_conn *qc;
struct listener *l;
struct proxy *prx;
struct quic_counters *prx_counters;
}
if (!qc) {
int ipv4;
- struct ebmb_node *n = NULL;
if (pkt->type != QUIC_PACKET_TYPE_INITIAL) {
TRACE_PROTO("Non Initial packet", QUIC_EV_CONN_LPKT, NULL, NULL, NULL, qv);
HA_ATOMIC_INC(&prx_counters->half_open_conn);
/* Insert the DCID the QUIC client has chosen (only for listeners) */
- n = ebmb_insert(&quic_dghdlrs[tid].odcids, &qc->odcid_node,
- qc->odcid.len + qc->odcid.addrlen);
-
- /* If the insertion failed, it means that another
- * thread has already allocated a QUIC connection for
- * the same CID. Liberate our allocated connection.
- */
- if (unlikely(n != &qc->odcid_node)) {
- qc_to_purge = qc;
-
- qc = ebmb_entry(n, struct quic_conn, odcid_node);
- pkt->qc = qc;
- }
-
- if (likely(!qc_to_purge)) {
- /* Enqueue this packet. */
- pkt->qc = qc;
- }
- else {
- quic_conn_release(qc_to_purge);
- }
- }
- else {
- pkt->qc = qc;
+ ebmb_insert(&quic_dghdlrs[tid].odcids, &qc->odcid_node,
+ qc->odcid.len + qc->odcid.addrlen);
}
+
+ pkt->qc = qc;
}
else {
TRACE_PROTO("short header packet received", QUIC_EV_CONN_LPKT, qc);