From: Andrew Zaborowski <andrew.zaborowski at intel.com>
To: ell at lists.01.org
Subject: [PATCH 1/3] tls: Flush record buffers on l_tls_close
Date: Thu, 26 May 2022 17:56:55 +0200 [thread overview]
Message-ID: <20220526155657.63641-1-andrew.zaborowski@intel.com> (raw)
[-- 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
next reply other threads:[~2022-05-26 15:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-26 15:56 Andrew Zaborowski [this message]
2022-05-26 16:23 [PATCH 1/3] tls: Flush record buffers on l_tls_close Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220526155657.63641-1-andrew.zaborowski@intel.com \
--to=ell@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).