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.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index a3cd1f3e1bb..285ed624d56 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -246,7 +246,7 @@ tcp_connection_del (tcp_connection_t * tc)
}
tcp_connection_t *
-tcp_connection_new (u8 thread_index)
+tcp_connection_alloc (u8 thread_index)
{
tcp_main_t *tm = vnet_get_tcp_main ();
tcp_connection_t *tc;
@@ -258,6 +258,15 @@ tcp_connection_new (u8 thread_index)
return tc;
}
+void
+tcp_connection_free (tcp_connection_t * tc)
+{
+ tcp_main_t *tm = &tcp_main;
+ pool_put (tm->connections[tc->c_thread_index], tc);
+ if (CLIB_DEBUG > 0)
+ clib_memset (tc, 0xFA, sizeof (*tc));
+}
+
/** Notify session that connection has been reset.
*
* Switch state to closed and wait for session to call cleanup.