aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vnet/tcp/tcp_input.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c
index ca8f2a53f31..b6d7a2b2bfb 100644
--- a/src/vnet/tcp/tcp_input.c
+++ b/src/vnet/tcp/tcp_input.c
@@ -1692,6 +1692,10 @@ static void
tcp_rcv_fin (tcp_worker_ctx_t * wrk, tcp_connection_t * tc, vlib_buffer_t * b,
u32 * error)
{
+ /* Reject out-of-order fins */
+ if (vnet_buffer (b)->tcp.seq_end != tc->rcv_nxt)
+ return;
+
/* Account for the FIN and send ack */
tc->rcv_nxt += 1;
tcp_program_ack (wrk, tc);