BUG/MEDIUM: stconn: Report error on SC on send if a previous SE error was set
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 29 Jul 2024 15:48:16 +0000 (17:48 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 3 Sep 2024 16:31:01 +0000 (18:31 +0200)
commite2a93b649286b30245333eec5851acd3991fda47
tree4f80244d6f8293d4644b0b93b63260aec82f7ab2
parentb2dabc930c0f6c231b0a757fd8e7e7b01818f398
BUG/MEDIUM: stconn: Report error on SC on send if a previous SE error was set

When a send on a connection is performed, if a SE error (or a pending error)
was already reported earlier, we leave immediately. No send is performed.
However, we must be sure to report the error at the SC level if necessary.
Indeed, the SE error may have been reported during the zero-copy data
forwarding. So during receive on the opposite side. In that case, we may
have missed the opportunity to report it at the SC level.

The patch must be backported as far as 2.8.

(cherry picked from commit 5dc45445ff18207dbacebf1f777e1f1abcd5065d)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/stconn.c