From: Charles-Henri Bruyand Date: Fri, 28 Jun 2024 08:26:49 +0000 (+0200) Subject: dnsdist: make sure to acquire lua context lock before calling TicketsKeyAdded callback X-Git-Tag: rec-5.2.0-alpha1~198^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e4e15de32c317ab1f7533699e8bb33aef4bc94d;p=thirdparty%2Fpdns.git dnsdist: make sure to acquire lua context lock before calling TicketsKeyAdded callback --- diff --git a/pdns/dnsdistdist/dnsdist-lua-hooks.cc b/pdns/dnsdistdist/dnsdist-lua-hooks.cc index 621e734512..a5e984e305 100644 --- a/pdns/dnsdistdist/dnsdist-lua-hooks.cc +++ b/pdns/dnsdistdist/dnsdist-lua-hooks.cc @@ -31,6 +31,7 @@ void setTicketsKeyAddedHook(const LuaContext& context, const TicketsKeyAddedHook { TLSCtx::setTicketsKeyAddedHook([hook](const std::string& key) { try { + auto lua = g_lua.lock(); hook(key.c_str(), key.size()); } catch (const std::exception& exp) {