From: Ben Magistro Date: Tue, 28 Sep 2021 17:24:12 +0000 (+0000) Subject: l4p/tcp: Fix clearing rx queue w/ private streams X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=940d8a82b96ccba31f0664a6d4ae5f510ce1d44f;p=tldk.git l4p/tcp: Fix clearing rx queue w/ private streams When using private streams, any remaining data in the rx queue for the stream is not cleared when the stream is closed. When the stream is then reused, this remaining data is added to the new stream. Signed-off-by: Ben Magistro Change-Id: I8ed221ed886db0fc4858f10d4682c147cc3ad92c --- diff --git a/lib/libtle_l4p/tcp_ctl.h b/lib/libtle_l4p/tcp_ctl.h index 814cc82..31cbbb2 100644 --- a/lib/libtle_l4p/tcp_ctl.h +++ b/lib/libtle_l4p/tcp_ctl.h @@ -177,9 +177,11 @@ tcp_stream_reset(struct tle_ctx *ctx, struct tle_tcp_stream *s) stbl_del_stream(&ts->st, s->ste, s, (s->flags & TLE_CTX_FLAG_ST) == 0); s->ste = NULL; - empty_rq(s); } + /* empty RX queue */ + empty_rq(s); + /* empty TX queue */ empty_tq(s);