From: Christopher Faulet Date: Thu, 5 Mar 2020 10:07:31 +0000 (+0100) Subject: BUG/MINOR: lua: Abort when txn:done() is called from a Lua action X-Git-Tag: v2.2-dev4~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ad7310399b60b53f1b9406ac9be7cdbb701db86;p=thirdparty%2Fhaproxy.git BUG/MINOR: lua: Abort when txn:done() is called from a Lua action When a lua action aborts a transaction calling txn:done() function, the action must return ACT_RET_ABRT instead of ACT_RET_DONE. It is mandatory to abort the message analysis. This patch must be backported everywhere the commit 7716cdf45 ("MINOR: lua: Get the action return code on the stack when an action finishes") was backported. For now, no backport needed. --- diff --git a/src/hlua.c b/src/hlua.c index 4043e29c2d..e6878974d7 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -5584,7 +5584,7 @@ __LJMP static int hlua_txn_done(lua_State *L) if (!(s->flags & SF_FINST_MASK)) s->flags |= finst; - lua_pushinteger(L, ACT_RET_DONE); + lua_pushinteger(L, ACT_RET_ABRT); WILL_LJMP(hlua_done(L)); return 0; }