summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index 44ee8c8bfcb..f9cb2a28e27 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -477,6 +477,18 @@ tcp_session_cleanup (u32 conn_index, u32 thread_index)
tcp_connection_cleanup (tc);
}
+static void
+tcp_session_reset (u32 conn_index, u32 thread_index)
+{
+ tcp_connection_t *tc;
+ tc = tcp_connection_get (conn_index, thread_index);
+ session_transport_closed_notify (&tc->connection);
+ tcp_send_reset (tc);
+ tcp_connection_timers_reset (tc);
+ tcp_connection_set_state (tc, TCP_STATE_CLOSED);
+ tcp_timer_update (tc, TCP_TIMER_WAITCLOSE, tcp_cfg.cleanup_time);
+}
+
/**
* Initialize all connection timers as invalid
*/
@@ -1258,6 +1270,7 @@ const static transport_proto_vft_t tcp_proto = {
.connect = tcp_session_open,
.close = tcp_session_close,
.cleanup = tcp_session_cleanup,
+ .reset = tcp_session_reset,
.send_mss = tcp_session_send_mss,
.send_space = tcp_session_send_space,
.update_time = tcp_update_time,