]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: connections: Report connection closing in conn_create_mux()
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 30 Apr 2025 11:19:38 +0000 (13:19 +0200)
committerOlivier Houchard <cognet@ci0.org>
Wed, 30 Apr 2025 15:17:36 +0000 (17:17 +0200)
commitb138eab302531bc40248337132ac01a541a111be
tree4b08802827b7c160c7636e8121ab7ed8e69be967
parentb81c9390f44289225aadebdf0f13ef80cb05eda4
BUG/MEDIUM: connections: Report connection closing in conn_create_mux()

Add an extra parametre to conn_create_mux(), "closed_connection".
If a pointer is provided, then let it know if the connection was closed.
Callers have no way to determine that otherwise, and we need to know
that, at least in ssl_sock_io_cb(), as if the connection was closed we
need to return NULL, as the tasklet was free'd, otherwise that can lead
to memory corruption and crashes.
This should be backported if 9240cd4a2771245fae4d0d69ef025104b14bfc23
is backported too.
include/haproxy/connection.h
src/backend.c
src/connection.c
src/ssl_sock.c
src/xprt_handshake.c