This fixes TCP connection cleanup crash when TCP debugging is enabled.
It could happen if session_stream_accept() returned an error.
Type: fix
Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Change-Id: I0df08969d82bb0f44def81b9e47195bd15502831
tcp_connection_init_vars (child);
child->rto = TCP_RTO_MIN;
tcp_connection_init_vars (child);
child->rto = TCP_RTO_MIN;
+ /*
+ * This initializes elog track, must be done before synack.
+ * We also do it before possible tcp_connection_cleanup() as it
+ * generates TCP_EVT_DELETE event.
+ */
+ TCP_EVT (TCP_EVT_SYN_RCVD, child, 1);
+
if (session_stream_accept (&child->connection, lc->c_s_index,
lc->c_thread_index, 0 /* notify */ ))
{
if (session_stream_accept (&child->connection, lc->c_s_index,
lc->c_thread_index, 0 /* notify */ ))
{
child->tx_fifo_size = transport_tx_fifo_size (&child->connection);
child->tx_fifo_size = transport_tx_fifo_size (&child->connection);
- /* This initializes elog track, must be done before synack */
- TCP_EVT (TCP_EVT_SYN_RCVD, child, 1);
-
tcp_send_synack (child);
done:
tcp_send_synack (child);
done: