aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-12-16 20:57:29 -0800
committerFlorin Coras <florin.coras@gmail.com>2018-12-17 18:51:19 +0000
commit8124cb784050275372e05a97b1e62f9f1ba5a091 (patch)
treefea3fc4fa4fea1517f482c949e16175d3f902d52 /src/vnet/tcp/tcp.c
parent91236ce0117fe5662b106b54824c84e44bfd7a2d (diff)
tcp: fix handling of broken syn options
Change-Id: Ia8b2a077ba4897ddd15cf33221b191cd7a3f1d33 Signed-off-by: Florin Coras <fcoras@cisco.com>
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.