]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: applet: Fix applet API to put input data in a buffer
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 18 Apr 2024 06:42:27 +0000 (08:42 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 18 Apr 2024 07:17:03 +0000 (09:17 +0200)
commit40aa87a28f6e5f26a9021908689b69016230c596
tree5540030b795d86cf8a23bf6b2d2a3dcdb87a9b18
parent10224d72fd5b4c793d6eb9e6ce84e42203c81ad7
BUG/MEDIUM: applet: Fix applet API to put input data in a buffer

applet_putblk and co were added to simplify applets. In 2.8, a fix was
pushed to deal with all errors as a room error because the vast majority of
applets didn't expect other kind of errors. The API was changed with the
commit 389b7d1f7b ("BUG/MEDIUM: applet: Fix API for function to push new
data in channels buffer").

Unfortunately and for unknown reason, the fix was totally failed. Checks on
channel functions were just wrong and not consistent. applet_putblk()
function is especially affected because the error is returned but no flag
are set on the SC to request more room. Because of this bug, applets relying
on it may be blocked, waiting for more room, and never woken up.

It is an issue for the peer and spoe applets.

This patch must be backported as far as 2.8.
include/haproxy/applet.h