summaryrefslogtreecommitdiffstats
path: root/src/plugins/unittest/tcp_test.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-10-17 14:53:11 -0700
committerMarco Varlese <marco.varlese@suse.de>2018-10-19 06:58:46 +0000
commit9a1e6eafd68b372e7aec53f75ac8f1881de72150 (patch)
tree6df01ec56c54ea500bbff4e33d9ecd996ae7bfe2 /src/plugins/unittest/tcp_test.c
parent703ee73dfbbec8c34ff7106170f5de05d9eae689 (diff)
tls: fix connection failures/interrupts at scale (VPP-1464)
Change-Id: I0bc4062c1fd3202ee201acb36a2bb14fc6ee1543 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit c01d578a625fb136bc33b0eb9c19907769a67989)
Diffstat (limited to 'src/plugins/unittest/tcp_test.c')
-rw-r--r--src/plugins/unittest/tcp_test.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/unittest/tcp_test.c b/src/plugins/unittest/tcp_test.c
index 92bf0ffd9c4..608f1efc53d 100644
--- a/src/plugins/unittest/tcp_test.c
+++ b/src/plugins/unittest/tcp_test.c
@@ -1615,13 +1615,14 @@ tcp_test_lookup (vlib_main_t * vm, unformat_input_t * input)
tcp_connection_t *tc;
stream_session_t *s, *s1;
u8 cmp = 0, is_filtered = 0;
+ u32 sidx;
/*
* Allocate fake session and connection 1
*/
pool_get (smm->sessions[0], s);
memset (s, 0, sizeof (*s));
- s->session_index = s - smm->sessions[0];
+ s->session_index = sidx = s - smm->sessions[0];
pool_get (tm->connections[0], tc);
memset (tc, 0, sizeof (*tc));
@@ -1662,7 +1663,7 @@ tcp_test_lookup (vlib_main_t * vm, unformat_input_t * input)
* Confirm that connection lookup works
*/
- s1 = pool_elt_at_index (smm->sessions[0], 0);
+ s1 = pool_elt_at_index (smm->sessions[0], sidx);
session_lookup_add_connection (tc1, session_handle (s1));
tconn = session_lookup_connection_wt4 (0, &tc1->lcl_ip.ip4,
&tc1->rmt_ip.ip4,