]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: session: strengthen connection attach to session
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 23 Jul 2025 08:03:51 +0000 (10:03 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 30 Jul 2025 09:39:26 +0000 (11:39 +0200)
commit668c2cfb0970f5cb47864095f3c53e752d155ca0
treed842f5d238f4a98cfb1469651397752710507075
parentcfe9bec1ea978a28095c49f661f55014f0453514
MINOR: session: strengthen connection attach to session

This commit is the first one of a serie to refactor insertion of backend
private connection into the session list.

session_add_conn() is used to attach a connection into a session list.
Previously, this function would report an error if the connection
specified was already attached to another session. However, this case
currently never happens and thus can be considered as buggy.

Remove this check and replace it with a BUG_ON(). This allows to ensure
that session insertion remains consistent. The same check is also
transformed in session_check_idle_conn().
include/haproxy/session.h