aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/quic/quic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/quic/quic.c')
-rw-r--r--src/plugins/quic/quic.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/src/plugins/quic/quic.c b/src/plugins/quic/quic.c
index f51881e508a..54a2d9019ba 100644
--- a/src/plugins/quic/quic.c
+++ b/src/plugins/quic/quic.c
@@ -1854,9 +1854,12 @@ quic_accept_connection (u32 ctx_index, quic_rx_packet_ctx_t * pctx)
quic_proto_on_close (ctx_index, thread_index);
return rv;
}
- ctx->conn_state = QUIC_CONN_STATE_HANDSHAKE;
- return quic_send_packets (ctx);
+ ctx->conn_state = QUIC_CONN_STATE_READY;
+ pctx->ctx_index = ctx_index;
+ pctx->thread_index = thread_index;
+
+ return 0;
}
static int
@@ -2039,13 +2042,22 @@ rx_start:
}
for (i = 0; i < max_packets; i++)
{
- if (packets_ctx[i].ptype != QUIC_PACKET_TYPE_RECEIVE)
- continue;
- ctx = quic_ctx_get (packets_ctx[i].ctx_index,
- packets_ctx[i].thread_index);
- quic_check_quic_session_connected (ctx);
- ctx = quic_ctx_get (packets_ctx[i].ctx_index,
- packets_ctx[i].thread_index);
+ switch (packets_ctx[i].ptype)
+ {
+ case QUIC_PACKET_TYPE_RECEIVE:
+ ctx = quic_ctx_get (packets_ctx[i].ctx_index,
+ packets_ctx[i].thread_index);
+ quic_check_quic_session_connected (ctx);
+ ctx = quic_ctx_get (packets_ctx[i].ctx_index,
+ packets_ctx[i].thread_index);
+ break;
+ case QUIC_PACKET_TYPE_ACCEPT:
+ ctx = quic_ctx_get (packets_ctx[i].ctx_index,
+ packets_ctx[i].thread_index);
+ break;
+ default:
+ continue;
+ }
quic_send_packets (ctx);
}