aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2019-11-19 15:45:26 +0000
committerFlorin Coras <florin.coras@gmail.com>2019-11-19 18:16:26 +0000
commit331c428a9c5f4686a9102eba9715233cceb43d55 (patch)
treea4fa275f561ae7773d9a4e2a3c24664725755b06 /src/plugins
parent989bc47d68187dd5db608d2b32abbbbc392b03ca (diff)
quic: handle duplicate packet from quicly
Type: fix Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: Ia4b1eb3c704374e27b260d88ae6ab628754468d3
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/quic/quic.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/plugins/quic/quic.c b/src/plugins/quic/quic.c
index 04e6ab8231b..f3297f99ac7 100644
--- a/src/plugins/quic/quic.c
+++ b/src/plugins/quic/quic.c
@@ -500,10 +500,23 @@ quic_on_receive (quicly_stream_t * stream, size_t off, const void *src,
max_enq = svm_fifo_max_enqueue_prod (f);
QUIC_DBG (3, "Enqueuing %u at off %u in %u space", len, off, max_enq);
- if (off - stream_data->app_rx_data_len + len > max_enq)
+ /* Handle duplicate packet/chunk from quicly */
+ if (off < stream_data->app_rx_data_len)
+ {
+ QUIC_DBG (3, "Session [idx %u, app_wrk %u, thread %u, rx-fifo 0x%llx]: "
+ "DUPLICATE PACKET (max_enq %u, len %u, "
+ "app_rx_data_len %u, off %u, ToBeNQ %u)",
+ stream_session->session_index,
+ stream_session->app_wrk_index,
+ stream_session->thread_index, f,
+ max_enq, len, stream_data->app_rx_data_len, off,
+ off - stream_data->app_rx_data_len + len);
+ return 0;
+ }
+ if (PREDICT_FALSE ((off - stream_data->app_rx_data_len + len) > max_enq))
{
QUIC_ERR ("Session [idx %u, app_wrk %u, thread %u, rx-fifo 0x%llx]: "
- "RX fifo is full (max_enq %u, len %u, "
+ "RX FIFO IS FULL (max_enq %u, len %u, "
"app_rx_data_len %u, off %u, ToBeNQ %u)",
stream_session->session_index,
stream_session->app_wrk_index,