]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: connection: Do not retrieve src/dst on another thread group's FD
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 29 Jul 2026 23:04:50 +0000 (01:04 +0200)
committerOlivier Houchard <cognet@ci0.org>
Thu, 30 Jul 2026 11:36:17 +0000 (13:36 +0200)
commitd3bdb250c33030955a2bdfffddc57cc48795ea7d
tree6d23d52fe36e6f860f878a7dd85f00096516f4cd
parent62d6ed440e83996f360ea00cdd328c6352f835f6
MINOR: connection: Do not retrieve src/dst on another thread group's FD

conn_get_src() and conn_get_dst() lazily fetch the connection's
addresses with getsockname()/getpeername() when they were not known
yet. They may be called on a foreign connection by observability code
running on any thread, for example "show peers", which dumps the peers
sessions' connections from whatever thread serves the CLI. With
per-thread-group FD tables, the FD of a connection owned by another
group is not usable from the calling thread.
So just fail if we attempt to access a connection that is owned by
another thread group.
include/haproxy/connection.h