From: Remi Gacogne Date: Mon, 18 Nov 2019 16:37:07 +0000 (+0100) Subject: dnsdist: Add Lua bindings for the AA, AD and RA flags X-Git-Tag: auth-4.3.0-beta1~26^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5de00b8718193588a4434fd5bdcb073540818123;p=thirdparty%2Fpdns.git dnsdist: Add Lua bindings for the AA, AD and RA flags --- diff --git a/pdns/dnsdist-lua-bindings.cc b/pdns/dnsdist-lua-bindings.cc index b02b4232f9..2cfb6f61e8 100644 --- a/pdns/dnsdist-lua-bindings.cc +++ b/pdns/dnsdist-lua-bindings.cc @@ -129,6 +129,30 @@ void setupLuaBindings(bool client) return (bool)dh.rd; }); + g_lua.registerFunction("setRA", [](dnsheader& dh, bool v) { + dh.ra=v; + }); + + g_lua.registerFunction("getRA", [](dnsheader& dh) { + return (bool)dh.ra; + }); + + g_lua.registerFunction("setAD", [](dnsheader& dh, bool v) { + dh.ad=v; + }); + + g_lua.registerFunction("getAD", [](dnsheader& dh) { + return (bool)dh.ad; + }); + + g_lua.registerFunction("setAA", [](dnsheader& dh, bool v) { + dh.aa=v; + }); + + g_lua.registerFunction("getAA", [](dnsheader& dh) { + return (bool)dh.aa; + }); + g_lua.registerFunction("setCD", [](dnsheader& dh, bool v) { dh.cd=v; });