From 62d46ba2a7a1783f37ec6beb6de3beead6838ba4 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 4 Feb 2025 10:42:19 +0100 Subject: [PATCH] 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. (cherry picked from commit db504fbdbee0afde435910510507212a5a751cba) Signed-off-by: Willy Tarreau --- src/flt_spoe.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/flt_spoe.c b/src/flt_spoe.c index 49ff896..cfa5d8a 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: -- 1.7.10.4