From: Florin Coras Date: Fri, 10 Nov 2017 00:26:03 +0000 (-0800) Subject: tcp: call accept notify after full connection init X-Git-Tag: v18.04-rc0~286 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=6dfb5ac3e6e0c3db89a8d5f31be81263ef8bc862;p=vpp.git tcp: call accept notify after full connection init Change-Id: I69998aa4eb587d80fc61d14bb28a9318a318f9ec Signed-off-by: Florin Coras --- diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c index 916d7ea111c..6d7bebadfeb 100644 --- a/src/vnet/tcp/tcp_input.c +++ b/src/vnet/tcp/tcp_input.c @@ -2753,15 +2753,6 @@ tcp46_listen_inline (vlib_main_t * vm, vlib_node_runtime_t * node, sizeof (ip6_address_t)); } - if (stream_session_accept (&child0->connection, lc0->c_s_index, - 0 /* notify */ )) - { - clib_warning ("session accept fail"); - tcp_connection_cleanup (child0); - error0 = TCP_ERROR_CREATE_SESSION_FAIL; - goto drop; - } - if (tcp_options_parse (th0, &child0->rcv_opts)) { clib_warning ("options parse fail"); @@ -2791,6 +2782,15 @@ tcp46_listen_inline (vlib_main_t * vm, vlib_node_runtime_t * node, tcp_connection_init_vars (child0); TCP_EVT_DBG (TCP_EVT_SYN_RCVD, child0, 1); + if (stream_session_accept (&child0->connection, lc0->c_s_index, + 0 /* notify */ )) + { + clib_warning ("session accept fail"); + tcp_connection_cleanup (child0); + error0 = TCP_ERROR_CREATE_SESSION_FAIL; + goto drop; + } + /* Reuse buffer to make syn-ack and send */ tcp_make_synack (child0, b0); next0 = tcp_next_output (is_ip4);