aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_input.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-12-20 18:24:49 -0800
committerDave Barach <openvpp@barachs.net>2018-12-21 04:19:20 +0000
commit78cc4b0797a983d5d31b9127fea9c2b72ed081d7 (patch)
tree5913b58559b7aaf3065f4ad12c4dee1c88fcaa00 /src/vnet/tcp/tcp_input.c
parent00a469d9691da6f2371bcc5a97adb020c011b4b4 (diff)
tcp: fix fin_wait_1 condition to send fin
Also add the closed-waiting session state wherein the session still allows the transport to send oustanding data. Change-Id: Ic47807379906ef2010934381ff0b9e53c7e631d8 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp_input.c')
-rw-r--r--src/vnet/tcp/tcp_input.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c
index dc8fffe2291..32de369b4cc 100644
--- a/src/vnet/tcp/tcp_input.c
+++ b/src/vnet/tcp/tcp_input.c
@@ -2645,7 +2645,7 @@ tcp46_rcv_process_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
{
u32 thread_index = vm->thread_index, errors = 0, *first_buffer;
tcp_worker_ctx_t *wrk = tcp_get_worker (thread_index);
- u32 n_left_from, *from;
+ u32 n_left_from, *from, max_dequeue;
from = first_buffer = vlib_frame_vector_args (from_frame);
n_left_from = from_frame->n_vectors;
@@ -2776,7 +2776,8 @@ tcp46_rcv_process_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
if (tc0->flags & TCP_CONN_FINPNDG)
{
/* TX fifo finally drained */
- if (!session_tx_fifo_max_dequeue (&tc0->connection))
+ max_dequeue = session_tx_fifo_max_dequeue (&tc0->connection);
+ if (max_dequeue <= tc0->burst_acked)
tcp_send_fin (tc0);
}
/* If FIN is ACKed */