]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: spoe: Properly switch SPOE filter to WAITING_ACK state
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 16 Mar 2026 06:46:30 +0000 (07:46 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 17 Mar 2026 06:47:52 +0000 (07:47 +0100)
When the SPOE applet is created, the SPOE filter is set in SENDING_MSGS
state. When the applet has transferred data, it should switch the filter to
WAITING_ACK state. Concretly, there is no bug. At best, it could save some
useless applet wakeups.

This patch should be backported as far as 3.1

src/flt_spoe.c

index 46a46cb3b70892a5226bb0c94d64b2a22b80042a..cac572287b333cf66243fcc97d947338222db8f9 100644 (file)
@@ -516,8 +516,11 @@ static void spoe_handle_appctx(struct appctx *appctx)
                                appctx->st0 = SPOE_APPCTX_ST_END;
                                applet_set_error(appctx);
                        }
-                       else if (!spoe_handle_receiving_frame_appctx(appctx))
-                               break;
+                       else {
+                               SPOE_APPCTX(appctx)->spoe_ctx->state = SPOE_CTX_ST_WAITING_ACK;
+                               if (!spoe_handle_receiving_frame_appctx(appctx))
+                                       break;
+                       }
                        goto switchstate;
 
                case SPOE_APPCTX_ST_EXIT: