summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-02-11 05:31:49 +0000
committerDave Barach <openvpp@barachs.net>2020-02-12 21:05:43 +0000
commit4dc10a4d560363147e58953b0301888cc57b15ce (patch)
treee4049884d72687eabbe29eceec0c607f93975f49 /src/vnet/session/session.c
parent0426185e65f4f1e001e62375c819fc8ed49a544d (diff)
tcp: improve invalid packet handling in syn-rcvd
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie356b4d45d47e30c185caf2e66cdb16f1a97046f
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r--src/vnet/session/session.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 0b66cf87c4d..b006cfaf2bb 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1003,7 +1003,14 @@ session_stream_accept_notify (transport_connection_t * tc)
if (!app_wrk)
return -1;
s->session_state = SESSION_STATE_ACCEPTING;
- return app_worker_accept_notify (app_wrk, s);
+ if (app_worker_accept_notify (app_wrk, s))
+ {
+ /* On transport delete, no notifications should be sent. Unless, the
+ * accept is retried and successful. */
+ s->session_state = SESSION_STATE_CREATED;
+ return -1;
+ }
+ return 0;
}
/**