* [PATCH 1/3] tls: Flush record buffers on l_tls_close
@ 2022-05-26 15:56 Andrew Zaborowski
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Zaborowski @ 2022-05-26 15:56 UTC (permalink / raw)
To: ell
[-- Attachment #1: Type: text/plain, Size: 565 bytes --]
We probably don't want to handle data fragments we received before an
l_tls_close if the TLS tunnel gets restarted in the future.
---
ell/tls.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ell/tls.c b/ell/tls.c
index c246f1f..c072afb 100644
--- a/ell/tls.c
+++ b/ell/tls.c
@@ -2852,6 +2852,9 @@ LIB_EXPORT bool l_tls_start(struct l_tls *tls)
LIB_EXPORT void l_tls_close(struct l_tls *tls)
{
+ tls->record_buf_len = 0;
+ tls->message_buf_len = 0;
+
TLS_DISCONNECT(TLS_ALERT_CLOSE_NOTIFY, 0, "Closing session");
}
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/3] tls: Flush record buffers on l_tls_close
@ 2022-05-26 16:23 Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2022-05-26 16:23 UTC (permalink / raw)
To: ell
[-- Attachment #1: Type: text/plain, Size: 309 bytes --]
Hi Andrew,
On 5/26/22 10:56, Andrew Zaborowski wrote:
> We probably don't want to handle data fragments we received before an
> l_tls_close if the TLS tunnel gets restarted in the future.
> ---
> ell/tls.c | 3 +++
> 1 file changed, 3 insertions(+)
>
All applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-26 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-26 15:56 [PATCH 1/3] tls: Flush record buffers on l_tls_close Andrew Zaborowski
2022-05-26 16:23 Denis Kenzior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).