l4p/tcp: Fix clearing rx queue w/ private streams 75/33875/1
authorBen Magistro <[email protected]>
Tue, 28 Sep 2021 17:24:12 +0000 (17:24 +0000)
committerBen Magistro <[email protected]>
Tue, 28 Sep 2021 17:24:12 +0000 (17:24 +0000)
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 <[email protected]>
Change-Id: I8ed221ed886db0fc4858f10d4682c147cc3ad92c

lib/libtle_l4p/tcp_ctl.h

index 814cc82..31cbbb2 100644 (file)
@@ -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);