]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: mux_h2: reject passive reverse conn if error on add to idle
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 16 Nov 2023 16:13:41 +0000 (17:13 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 16 Nov 2023 17:43:32 +0000 (18:43 +0100)
commita1457296d5688d6604ddc319f172f4d74fe163a4
tree8c247922a1493a9dcd0b4fbfb2079cabb82ca47a
parent8cc3fc73f13fe94d2454996fddd3fc046818ec78
BUG/MINOR: mux_h2: reject passive reverse conn if error on add to idle

On passive reverse, H2 mux is responsible to insert the connection in
the server idle list. This is done via srv_add_to_idle_list(). However,
this function may fail for various reason, such as FD usage limit
reached.

Handle properly this error case. H2 mux flags the connection on error
which will cause its release. Prior to this patch, the connection was
only released on server timeout.

This bug was found inspecting server curr_used_conns counter. Indeed, on
connection reverse, this counter is first incremented. It is decremented
just after on srv_add_to_idle_list() if insertion is validated. However,
if insertion is rejected, the connection was not released which cause
curr_used_conns to remains positive. This has the major downside to
break the reusing of idle connection on rhttp causing spurrious 503
errors.

No need to backport.
src/mux_h2.c