aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-12-04 09:21:36 -0800
committerDave Barach <openvpp@barachs.net>2018-12-05 15:36:46 +0000
commit4af830cd7b4a11bb84840183f7eebd6fb43497a6 (patch)
tree3a47abfae6a651a4be8f5c6a6cb180399c90db62 /src/vnet/session
parent01fdbcca130a6575712de99e26f46e21da432d40 (diff)
session/tcp: postpone cleanup on reset
Change-Id: I45fd7538853f84c6c8bf804cc20acbc9601db3ba Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/session.c2
-rwxr-xr-xsrc/vnet/session/session_api.c5
-rw-r--r--src/vnet/session/session_node.c5
3 files changed, 9 insertions, 3 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index b944f5a2104..6533303d0c6 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -835,7 +835,7 @@ stream_session_reset_notify (transport_connection_t * tc)
app_worker_t *app_wrk;
application_t *app;
s = session_get (tc->s_index, tc->thread_index);
- s->session_state = SESSION_STATE_CLOSED;
+ svm_fifo_dequeue_drop_all (s->server_tx_fifo);
app_wrk = app_worker_get (s->app_wrk_index);
app = application_get (app_wrk->app_index);
app->cb_fns.session_reset_callback (s);
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 31139c32ed5..40fc41629d4 100755
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -1063,6 +1063,7 @@ vl_api_disconnect_session_reply_t_handler (vl_api_disconnect_session_reply_t *
static void
vl_api_reset_session_reply_t_handler (vl_api_reset_session_reply_t * mp)
{
+ vnet_disconnect_args_t _a = { 0 }, *a = &_a;
app_worker_t *app_wrk;
application_t *app;
stream_session_t *s;
@@ -1097,7 +1098,9 @@ vl_api_reset_session_reply_t_handler (vl_api_reset_session_reply_t * mp)
/* This comes as a response to a reset, transport only waiting for
* confirmation to remove connection state, no need to disconnect */
- stream_session_cleanup (s);
+ a->handle = mp->handle;
+ a->app_index = app->app_index;
+ vnet_disconnect_session (a);
}
static void
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index cf2d5766fb0..14576685a76 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -84,6 +84,7 @@ session_mq_accepted_reply_handler (void *data)
static void
session_mq_reset_reply_handler (void *data)
{
+ vnet_disconnect_args_t _a = { 0 }, *a = &_a;
session_reset_reply_msg_t *mp;
app_worker_t *app_wrk;
stream_session_t *s;
@@ -119,7 +120,9 @@ session_mq_reset_reply_handler (void *data)
/* This comes as a response to a reset, transport only waiting for
* confirmation to remove connection state, no need to disconnect */
- stream_session_cleanup (s);
+ a->handle = mp->handle;
+ a->app_index = app->app_index;
+ vnet_disconnect_session (a);
}
static void