BUG/MEDIUM: lua: the function txn_done() from action wrapper can crash
authorThierry FOURNIER <thierry.fournier@ozon.io>
Thu, 14 Jul 2016 09:45:33 +0000 (11:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 14 Jul 2016 14:14:32 +0000 (16:14 +0200)
commit9bd52d478b2561666633f21086b60a1b488a25b7
treeb3e0ff6e107f3ca24016f1fbc7ba66f75e193a59
parentab00df6cf64c0840aa9dd20cee4eb8e9f4297eba
BUG/MEDIUM: lua: the function txn_done() from action wrapper can crash

If an action wrapper stops the processing of the transaction
with a txn_done() function, the return code of the action is
"continue". So the continue can implies the processing of other
like adding headers. However, the HTTP content is flushed and
a segfault occurs.

This patchs add a flag indicating that the Lua code want to
stop the processing, ths flags is forwarded to the haproxy core,
and other actions are ignored.

Must be backported in 1.6
include/types/hlua.h
src/hlua.c