From: Christopher Faulet Date: Tue, 4 Feb 2025 09:42:19 +0000 (+0100) Subject: BUG/MEDIUM: flt-spoe: Set/test applet flags instead of SE flags from I/O handler X-Git-Tag: v3.2-dev5~32 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=db504fbdbee0afde435910510507212a5a751cba;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: flt-spoe: Set/test applet flags instead of SE flags from I/O handler The SPOE applet is using the new applet API. Thus end of input, end of stream and errors must be reported using the applet flags, not the SE flags. This was not the case. So let's fix it. It seems this bug is harmless for now. This patch must be backported to 3.1. --- diff --git a/src/flt_spoe.c b/src/flt_spoe.c index 7aa354dcb..0e78d49cb 100644 --- a/src/flt_spoe.c +++ b/src/flt_spoe.c @@ -490,7 +490,7 @@ static void spoe_handle_appctx(struct appctx *appctx) if (!appctx_get_buf(appctx, &appctx->inbuf)) goto out; - if (unlikely(se_fl_test(appctx->sedesc, (SE_FL_EOS|SE_FL_ERROR)))) { + if (unlikely(applet_fl_test(appctx, APPCTX_FL_EOS|APPCTX_FL_ERROR))) { b_reset(&appctx->inbuf); applet_fl_clr(appctx, APPCTX_FL_INBLK_FULL); goto out; @@ -509,11 +509,11 @@ static void spoe_handle_appctx(struct appctx *appctx) case SPOE_APPCTX_ST_EXIT: appctx->st0 = SPOE_APPCTX_ST_END; - se_fl_set(appctx->sedesc, SE_FL_EOS); + applet_set_eos(appctx); if (SPOE_APPCTX(appctx)->status_code != SPOP_ERR_NONE) - se_fl_set(appctx->sedesc, SE_FL_ERROR); + applet_set_error(appctx); else - se_fl_set(appctx->sedesc, SE_FL_EOI); + applet_set_eoi(appctx); __fallthrough; case SPOE_APPCTX_ST_END: