summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_input.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_input.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_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 4406d685b6c..f0ae8b11434 100644
--- a/src/vnet/tcp/tcp_input.c
+++ b/src/vnet/tcp/tcp_input.c
@@ -3097,7 +3097,7 @@ tcp46_listen_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
}
/* Create child session and send SYN-ACK */
- child0 = tcp_connection_new (my_thread_index);
+ child0 = tcp_connection_alloc (my_thread_index);
child0->c_lcl_port = th0->dst_port;
child0->c_rmt_port = th0->src_port;
child0->c_is_ip4 = is_ip4;
@@ -3119,7 +3119,8 @@ tcp46_listen_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
if (tcp_options_parse (th0, &child0->rcv_opts, 1))
{
- clib_warning ("options parse fail");
+ error0 = TCP_ERROR_OPTIONS;
+ tcp_connection_free (child0);
goto drop;
}