]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: stconn: don't wake up an applet waiting on buffer allocation
authorWilly Tarreau <w@1wt.eu>
Tue, 30 Apr 2024 06:38:18 +0000 (08:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 30 Apr 2024 19:36:47 +0000 (21:36 +0200)
commit072686dafd56c280347c344dcdd0fa76857599ae
tree2e64a98164e6233929ac15c86a236fc2df7fe31b
parent12d08cf912389dcc56409b897c46a3edcc6cbf61
BUG/MINOR: stconn: don't wake up an applet waiting on buffer allocation

Since the extension of the buffers API to applets in 3.0-dev, an applet
may find itself unable to allocate a buffer, and will block respectively
on APPCTX_FL_OUTBLK_ALLOC or APPCTX_FL_INBLK_ALLOC depending on the
direction. However the code in sc_applet_process() doesn't consider this
situation when deciding to wake up an applet, so when the condition
arises, the applet keeps ringing and is killed by the loop detector.

The fix is trivial and simply consists in checking for the flags above.
No backport is needed since this is new in 3.0.
src/stconn.c