Skip to content

Commit 1cd30c9

Browse files
committed
BUG/MINOR: spoe: Don't report error on applet release if filter is in DONE state
When the SPOE applet was released, if a SPOE filter context was still attached to it, an error was reported to the filter. However, there is no reason to report an error if the ACK message was already received. Because of this bug, if the ACK message is received and the SPOE connection is immediately closed, this prevents the ACK message to be processed. This patch should be backported to 3.1.
1 parent dcce02d commit 1cd30c9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/flt_spoe.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,10 @@ static void spoe_release_appctx(struct appctx *appctx)
441441
if (spoe_appctx->spoe_ctx) {
442442
/* Report an error to stream */
443443
spoe_appctx->spoe_ctx->spoe_appctx = NULL;
444-
spoe_appctx->spoe_ctx->state = SPOE_CTX_ST_ERROR;
445-
spoe_appctx->spoe_ctx->status_code = (spoe_appctx->status_code + 0x100);
444+
if (spoe_appctx->spoe_ctx->state != SPOE_CTX_ST_DONE) {
445+
spoe_appctx->spoe_ctx->state = SPOE_CTX_ST_ERROR;
446+
spoe_appctx->spoe_ctx->status_code = (spoe_appctx->status_code + 0x100);
447+
}
446448
task_wakeup(spoe_appctx->spoe_ctx->strm->task, TASK_WOKEN_MSG);
447449
}
448450

0 commit comments

Comments
 (0)