]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: proto_reverse_connect: set default maxconn
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 22 Sep 2023 13:51:23 +0000 (15:51 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 22 Sep 2023 14:40:58 +0000 (16:40 +0200)
commita37abee26658e1d1e8e36d8c9e585d2edce3f6d6
treeb8f5eacf957e8eb2ffeb5345f7161af237843d47
parent27b2fd2e064bd102c7c06899041294aab68efb9d
BUG/MINOR: proto_reverse_connect: set default maxconn

If maxconn is not set for preconnect, it assumes we want to establish a
single connection. However, this does not work properly in case the
connection is closed after reversal. Listener is not resumed by protocol
layer to attempt a new preconnect.

To fix this, explicitely set maxconn to 1 in the listener instance if
none is defined. This ensures the behavior is consistent. A BUG_ON() has
been added to validate we never try to use a listener with a 0 maxconn.
src/proto_reverse_connect.c