From: "Max R. Carrara" <m.carrara@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [PATCH proxmox v3 0/5] Fix #6738: Improve TLS Handshake Handling & Error Logging
Date: Tue, 10 Nov 2026 12:07:22 +0100 [thread overview]
Message-ID: <20261110110728.144880-1-m.carrara@proxmox.com> (raw)
Fix #6738: Improve TLS Handshake Handling & Error Logging - v3
==============================================================
This is a slightly bigger refresh of an older patch (see below) that
reduces the noisiness of TLS handshake errors, in particular when health
checks are only opening and closing connections without sending any
data.
The reason why I'm "revamping" this is to make the code more readable
overall, add tests, and also to fix a very rare, but possible race
condition, where we inspect the incoming buffer too quickly while the
client is still sending data -- see patch #4 for the details.
Patch #5 contains the actual fix for #6738.
I smoke tested all of this on my local development setup, but another
look certainly wouldn't hurt here.
Notable Changes
---------------
- Use a proper `enum` instead of an `Option<bool>` to represent the
outcome of the TLS handshake check (patch #1)
- Add tests for the TLS handshake handling (patch #2)
- Fix race condition where we inspect the incoming buffer too quickly
while the client is still sending data (patch #4)
Note that this race condition is only really possible if we received
less than 5 bytes from the client initially. I'm not sure when this
would ever "naturally" occur, but some misbehaved script or perhaps
some kind of "streaming" proxy could maybe trigger this.
Previous Versions
-----------------
v1: https://lore.proxmox.com/pbs-devel/20250910154041.1032251-1-m.carrara@proxmox.com/
v2: https://lore.proxmox.com/pbs-devel/20260427134051.557840-1-m.carrara@proxmox.com/
Summary of Changes
------------------
proxmox:
Max R. Carrara (5):
rest-server: connection: use enum for TLS handshake check result
rest-server: connection: add tests for TLS handshake check
rest-server: connection: log cause of TLS handshake check errors
rest-server: connection: avoid dropping clients during TLS check
fix #6738: rest-server: log early closed connections at debug level
proxmox-rest-server/src/connection.rs | 289 +++++++++++++++++++++++---
1 file changed, 263 insertions(+), 26 deletions(-)
Summary over all repositories:
1 files changed, 263 insertions(+), 26 deletions(-)
--
Generated by murpp 0.12.0
next reply other threads:[~2026-11-10 11:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 11:07 Max R. Carrara [this message]
2026-11-10 11:07 ` [PATCH proxmox v3 1/5] rest-server: connection: use enum for TLS handshake check result Max R. Carrara
2026-11-10 11:07 ` [PATCH proxmox v3 2/5] rest-server: connection: add tests for TLS handshake check Max R. Carrara
2026-11-10 11:07 ` [PATCH proxmox v3 3/5] rest-server: connection: log cause of TLS handshake check errors Max R. Carrara
2026-11-10 11:07 ` [PATCH proxmox v3 4/5] rest-server: connection: avoid dropping clients during TLS check Max R. Carrara
2026-11-10 11:07 ` [PATCH proxmox v3 5/5] fix #6738: rest-server: log early closed connections at debug level Max R. Carrara
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=20261110110728.144880-1-m.carrara@proxmox.com \
--to=m.carrara@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.