]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[BUG] stream_sock: ensure orphan listeners don't accept too many connections
authorWilly Tarreau <w@1wt.eu>
Sun, 24 Jul 2011 17:16:52 +0000 (19:16 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 24 Jul 2011 17:16:52 +0000 (19:16 +0200)
commitff45b8ccc61ff64c24c3286431b60f05534e120d
treef4ea578fbc7b9a42c28614d64b699cf53dc11b3a
parentbe58c38264b618e2a116b0d0c0f9f7cb2c86933b
[BUG] stream_sock: ensure orphan listeners don't accept too many connections

For listeners that are not bound to a frontend, the limit on the
number of accepted connections is tested at the end of the accept()
loop, but we don't break out of the loop, meaning that if more
connections than what the listener allows are available and if this
is less than the proxy's limits and within the size of a batch, then
they could be accepted. In practice, this problem currently cannot
appear since all listeners are bound to a frontend, and it's a very
minor issue anyway.

1.4 has the same issue (which cannot happen there either), but there
is some code after it, so it's the code cleanup which revealed it.
src/stream_sock.c