If multiple syns are received in one dispatch for the same time-wait
connection, the first removes the connection while subsequent packets
either lookup a nonexistent or an unrelated connection.
Avoid the former with a check.
Type: fix
Change-Id: Ia5f1b3bbd568566eaf36121206aa12363a15b418
Signed-off-by: Florin Coras <[email protected]>
tcp_connection_t *tc;
tc = tcp_connection_get (vnet_buffer (b[0])->tcp.connection_index,
thread_index);
- if (tc->state != TCP_STATE_TIME_WAIT)
+ if (!tc || tc->state != TCP_STATE_TIME_WAIT)
{
tcp_inc_counter (listen, TCP_ERROR_CREATE_EXISTS, 1);
goto done;