diff options
author | Florin Coras <fcoras@cisco.com> | 2019-05-23 22:28:16 -0700 |
---|---|---|
committer | John Lo <loj@cisco.com> | 2019-05-25 07:25:45 +0000 |
commit | 378213974e2c361c45a325c22ec5a9ca6a0a13cd (patch) | |
tree | a834c8e28056948525c91a76765e6e6fd7bd9973 /src/vnet | |
parent | 6af82438144fca93af4df4c2808827dbbc392699 (diff) |
tcp: handle fin+rst in same frame
Change-Id: Ie7a6c7b92a6beeb356f01384216a4982fb3d420e
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/session/session.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index c56712bbf87..4374678348e 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -879,9 +879,16 @@ session_transport_closed_notify (transport_connection_t * tc) if (!(s = session_get_if_valid (tc->s_index, tc->thread_index))) return; + /* Transport thinks that app requested close but it actually didn't. + * Can happen for tcp if fin and rst are received in close succession. */ + if (s->session_state == SESSION_STATE_READY) + { + session_transport_closing_notify (tc); + svm_fifo_dequeue_drop_all (s->server_tx_fifo); + } /* If app close has not been received or has not yet resulted in * a transport close, only mark the session transport as closed */ - if (s->session_state <= SESSION_STATE_CLOSING) + else if (s->session_state <= SESSION_STATE_CLOSING) { session_lookup_del_session (s); s->session_state = SESSION_STATE_TRANSPORT_CLOSED; |