From 692b9498ee5511a17bfbc3a2c6e87339aa3b8df8 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Fri, 12 Jul 2019 15:01:53 -0700 Subject: session: allow transports to generate closed notifications In contrast to the closing notification, whereby a transport informs the session layer that is beginning the closing procedure, this allows transports to notify the session layer of the fact that the transport is "fully" closed, i.e., it expects no more data. Also: - adds app closed state for sessions - changes tcp to have it notify when an active close has finished Type: feature Change-Id: I13c738006c03f85015e05ab82843a33a69382aaf Signed-off-by: Florin Coras --- src/vnet/tcp/tcp_input.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/vnet/tcp') diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c index a9bf10fcdf9..04139677a7b 100644 --- a/src/vnet/tcp/tcp_input.c +++ b/src/vnet/tcp/tcp_input.c @@ -2878,6 +2878,7 @@ tcp46_rcv_process_inline (vlib_main_t * vm, vlib_node_runtime_t * node, tcp_connection_timers_reset (tc0); tcp_connection_set_state (tc0, TCP_STATE_TIME_WAIT); tcp_timer_set (tc0, TCP_TIMER_WAITCLOSE, TCP_TIMEWAIT_TIME); + session_transport_closed_notify (&tc0->connection); goto drop; break; @@ -3004,6 +3005,7 @@ tcp46_rcv_process_inline (vlib_main_t * vm, vlib_node_runtime_t * node, tcp_connection_timers_reset (tc0); tcp_timer_set (tc0, TCP_TIMER_WAITCLOSE, TCP_TIMEWAIT_TIME); tcp_program_ack (wrk, tc0); + session_transport_closed_notify (&tc0->connection); break; case TCP_STATE_TIME_WAIT: /* Remain in the TIME-WAIT state. Restart the time-wait -- cgit 1.2.3-korg