aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libtle_l4p/tcp_rxtx.c
diff options
context:
space:
mode:
authorKonstantin Ananyev <konstantin.ananyev@intel.com>2021-07-07 17:25:00 +0000
committerKonstantin Ananyev <konstantin.ananyev@intel.com>2021-07-07 17:25:00 +0000
commitd2baf65c86ac164346f25828c54775bab8343841 (patch)
treee6c02274bbca78a902aa837813f041f749bdb610 /lib/libtle_l4p/tcp_rxtx.c
parentace4313dfd1f17eac022e497bb412e8e290c05e3 (diff)
l4p/tcp: introduce tle_tcp_stream_abort() API
Introduce ability ot perform abnormal connection termination. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: I75b5153505348ceface903cd2c8e012707631168
Diffstat (limited to 'lib/libtle_l4p/tcp_rxtx.c')
-rw-r--r--lib/libtle_l4p/tcp_rxtx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libtle_l4p/tcp_rxtx.c b/lib/libtle_l4p/tcp_rxtx.c
index 03b6c63..af885ca 100644
--- a/lib/libtle_l4p/tcp_rxtx.c
+++ b/lib/libtle_l4p/tcp_rxtx.c
@@ -2697,6 +2697,10 @@ tx_stream(struct tle_tcp_stream *s, uint32_t tms)
/* start RTO timer. */
if (s->tcb.snd.nxt != s->tcb.snd.una)
timer_start(s);
+ } else if (state == TLE_TCP_ST_CLOSED) {
+ if ((s->tcb.snd.close_flags & TCP_FLAG_RST) != 0)
+ send_rst(s, s->tcb.snd.nxt);
+ stream_term(s);
}
}