/* 4th: check the SYN bit (in window) */
if (PREDICT_FALSE (tcp_syn (th0)))
{
+ /* As per RFC5961 send challenge ack instead of reset */
+ tcp_program_ack (wrk, tc0);
*error0 = TCP_ERROR_SPURIOUS_SYN;
- tcp_send_reset (tc0);
goto error;
}
for (i = 0; i < vec_len (ongoing_fast_rxt); i++)
{
tc = tcp_connection_get (ongoing_fast_rxt[i], thread_index);
+ if (!tc)
+ continue;
if (!tcp_in_fastrecovery (tc))
{
tc->flags &= ~TCP_CONN_FRXT_PENDING;
else
{
tcp_fastrecovery_first_on (tc);
- /* Reuse last bytes delivered to track total bytes acked */
- tc->sack_sb.last_bytes_delivered += tc->bytes_acked;
if (tc->snd_rxt_bytes > tc->bytes_acked)
tc->snd_rxt_bytes -= tc->bytes_acked;
else
* allocate session send reset */
if (session_stream_connect_notify (&new_tc0->connection, 0))
{
- clib_warning ("connect notify fail");
tcp_send_reset_w_pkt (new_tc0, b0, my_thread_index, is_ip4);
tcp_connection_cleanup (new_tc0);
+ error0 = TCP_ERROR_CREATE_SESSION_FAIL;
goto drop;
}
tcp_connection_cleanup (new_tc0);
tcp_send_reset_w_pkt (tc0, b0, my_thread_index, is_ip4);
TCP_EVT_DBG (TCP_EVT_RST_SENT, tc0);
+ error0 = TCP_ERROR_CREATE_SESSION_FAIL;
goto drop;
}
child0->rto = TCP_RTO_MIN;
if (session_stream_accept (&child0->connection, lc0->c_s_index,
- 0 /* notify */ ))
+ lc0->c_thread_index, 0 /* notify */ ))
{
tcp_connection_cleanup (child0);
error0 = TCP_ERROR_CREATE_SESSION_FAIL;