]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: servers: use proper source of pool_conn_name in srv_settings_cpy()
authorWilly Tarreau <w@1wt.eu>
Fri, 15 May 2026 05:20:48 +0000 (05:20 +0000)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 May 2026 15:39:25 +0000 (17:39 +0200)
commit5b468a08200f1af0293bb0d6da94e53570281fe8
tree4bc6077f0cdb413192653ce5502c3fc7dba57619
parent6c663a93746532086f7913d3968ce16c4542b4fb
BUG/MINOR: servers: use proper source of pool_conn_name in srv_settings_cpy()

The condition 'if (srv->pool_conn_name)' was checking the destination
instead of the source 'src->pool_conn_name', meaning the strdup() would
never fire (since newly calloc'd servers start with NULL pool_conn_name),
and the pool_conn_name setting from default-server was silently ignored.

Introduced in 3.2 with commit f0f1816f1 ("MINOR: check: implement
check-pool-conn-name srv keyword") when pool_conn_name support was added
to srv_settings_cpy(). The bug caused any 'pool-conn-name' setting in a
'default-server' line to be lost for all servers inheriting from it.

Note that it's not the first time this function induces such a bug due
to the poor choice of "srv" vs "src" that should be renamed to avoid
keyboard mistakes and visual confusion.

This needs to be backported to 3.2.
src/server.c