diff options
author | Florin Coras <fcoras@cisco.com> | 2017-11-09 16:26:03 -0800 |
---|---|---|
committer | Florin Coras <fcoras@cisco.com> | 2017-11-09 16:38:40 -0800 |
commit | 6dfb5ac3e6e0c3db89a8d5f31be81263ef8bc862 (patch) | |
tree | 327b0e752387d42f3ee01ee9cecec9660798dc0b /src/vnet | |
parent | f1493140af6ec734c9cd57cfc3d0822207c519c5 (diff) |
tcp: call accept notify after full connection init
Change-Id: I69998aa4eb587d80fc61d14bb28a9318a318f9ec
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/tcp/tcp_input.c | 18 |
1 files changed, 9 insertions, 9 deletions
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); |