summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vnet/session/session.c6
-rw-r--r--src/vnet/tcp/tcp_input.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index ed205d7627f..d0792faec09 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -732,6 +732,10 @@ stream_session_connect_notify (transport_connection_t * tc, u8 sst,
/* Cleanup session lookup */
stream_session_half_open_table_del (smm, sst, tc);
+
+ /* Add to established lookup table */
+ handle = (((u64) tc->thread_index) << 32) | (u64) new_s->session_index;
+ stream_session_table_add_for_tc (tc, handle);
}
void
@@ -1104,7 +1108,7 @@ session_manager_main_enable (vlib_main_t * vm)
for (i = 0; i < 200000; i++)
{
stream_session_t *ss;
- pool_get (smm->sessions[0], ss);
+ pool_get_aligned (smm->sessions[0], ss, CLIB_CACHE_LINE_BYTES);
memset (ss, 0, sizeof (*ss));
}
diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c
index 318d8ec5c89..ddee41e0b9e 100644
--- a/src/vnet/tcp/tcp_input.c
+++ b/src/vnet/tcp/tcp_input.c
@@ -1135,6 +1135,10 @@ tcp_segment_rcv (tcp_main_t * tm, tcp_connection_t * tc, vlib_buffer_t * b,
error = TCP_ERROR_SEGMENT_OLD;
*next0 = TCP_NEXT_DROP;
+ /* Completely in the past (possible retransmit) */
+ if (seq_lt (vnet_buffer (b)->tcp.seq_end, tc->rcv_nxt))
+ goto done;
+
/* Chop off the bytes in the past */
n_bytes_to_drop = tc->rcv_nxt - vnet_buffer (b)->tcp.seq_number;
n_data_bytes -= n_bytes_to_drop;
@@ -1553,6 +1557,7 @@ tcp46_syn_sent_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
clib_memcpy (new_tc0, tc0, sizeof (*new_tc0));
new_tc0->c_thread_index = my_thread_index;
+ new_tc0->c_c_index = new_tc0 - tm->connections[my_thread_index];
/* Cleanup half-open connection XXX lock */
pool_put (tm->half_open_connections, tc0);