aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session-apps/echo_server.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-05-02 14:34:32 -0700
committerDave Barach <openvpp@barachs.net>2018-05-03 11:30:17 +0000
commit6f1c48db24b5731176d57121c47040339e6d7f6c (patch)
tree1c1221ebef51b78024280407e723892a3bb56290 /src/vnet/session-apps/echo_server.c
parentec8aea1b1ed08fe6d0052ad1ed1059665479940e (diff)
tcp: fix echo server rx retries counter vec alloc
If sessions are not preallocated, the rx retries counters are not correctly validated/initialized Change-Id: Iaf7456f3a0e2181fcea0c370613d694f8e98276d Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session-apps/echo_server.c')
-rw-r--r--src/vnet/session-apps/echo_server.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vnet/session-apps/echo_server.c b/src/vnet/session-apps/echo_server.c
index f34a4909a34..7d1ae5a4d49 100644
--- a/src/vnet/session-apps/echo_server.c
+++ b/src/vnet/session-apps/echo_server.c
@@ -63,6 +63,8 @@ echo_server_session_accept_callback (stream_session_t * s)
session_manager_get_vpp_event_queue (s->thread_index);
s->session_state = SESSION_STATE_READY;
esm->byte_index = 0;
+ ASSERT (vec_len (esm->rx_retries) > s->thread_index);
+ vec_validate (esm->rx_retries[s->thread_index], s->session_index);
esm->rx_retries[s->thread_index][s->session_index] = 0;
return 0;
}