From: Christopher Faulet Date: Mon, 16 Feb 2026 18:14:57 +0000 (+0100) Subject: BUG/MEDIUM: applet: Fix test on shut flags for legacy applets (v2) X-Git-Tag: v3.4-dev5~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b7843f1c1da78ec83379479088a8e546ae73014;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: applet: Fix test on shut flags for legacy applets (v2) The previous fix was wrong. When shut flags are tested for legacy applets, to know if the I/O handler can be called or not, we must be sure shut for reads and for writes are both set to skip the applet I/O handler. This bug introduced regression, at least for the peer applet and for the DNS applet. This patch must be backported with abc1947e1 ("BUG/MEDIUM: applet: Fix test on shut flags for legacy applets"), so as far as 3.0. --- diff --git a/src/applet.c b/src/applet.c index 51ed0f9d8..0e4ecf69d 100644 --- a/src/applet.c +++ b/src/applet.c @@ -852,7 +852,7 @@ struct task *task_run_applet(struct task *t, void *context, unsigned int state) /* Don't call I/O handler if the applet was shut (release callback was * already called) */ - if (!se_fl_test(app->sedesc, SE_FL_SHR | SE_FL_SHW)) + if (!se_fl_test(app->sedesc, SE_FL_SHR) || !se_fl_test(app->sedesc, SE_FL_SHW)) app->applet->fct(app); TRACE_POINT(APPLET_EV_PROCESS, app);