]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: applet: Fix test on shut flags for legacy applets
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 30 Jan 2026 08:51:00 +0000 (09:51 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 30 Jan 2026 08:55:18 +0000 (09:55 +0100)
A regression was introduced in the commit 0ea601127 ("BUG/MAJOR: applet: Don't
call I/O handler if the applet was shut"). The test on shut flags for legacy
applets is inverted.

It should be harmeless on 3.4 and 3.3 because all applets were converted. But
this fix is mandatory for 3.2 and older.

The patch must be backported as far as 3.0 with the commit above.

src/applet.c

index de555c3250b7bce34d0501d7a1179f9347e50588..51ed0f9d8a5300ee2716a7c6f01563370ff8ade7 100644 (file)
@@ -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_SHW))
                app->applet->fct(app);
 
        TRACE_POINT(APPLET_EV_PROCESS, app);