From d2baf65c86ac164346f25828c54775bab8343841 Mon Sep 17 00:00:00 2001 From: Konstantin Ananyev Date: Wed, 7 Jul 2021 17:25:00 +0000 Subject: l4p/tcp: introduce tle_tcp_stream_abort() API Introduce ability ot perform abnormal connection termination. Signed-off-by: Konstantin Ananyev Change-Id: I75b5153505348ceface903cd2c8e012707631168 --- lib/libtle_l4p/tcp_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/libtle_l4p/tcp_rxtx.c') 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); } } -- cgit 1.2.3-korg