]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
expose some more variables to lua
authorbert hubert <bert.hubert@netherlabs.nl>
Mon, 18 Dec 2017 11:45:55 +0000 (12:45 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Mon, 18 Dec 2017 11:45:55 +0000 (12:45 +0100)
pdns/lua-record.cc

index a7acda43292f013b183ed0d8c2d5470d6f68ea31..6c1258a59e38d40ccca557be012ea9fb33155ff5 100644 (file)
@@ -397,6 +397,10 @@ std::vector<shared_ptr<DNSRecordContent>> luaSynth(const std::string& code, cons
   LuaContext& lua = *alua.getLua();
   lua.writeVariable("qname", query);
   lua.writeVariable("who", dnsp.getRemote());
+  lua.writeVariable("dh", (dnsheader*)&dnsp.d);
+  lua.writeVariable("dnssecOK", dnsp.d_dnssecOk);
+  lua.writeVariable("tcp", dnsp.d_tcp);
+  lua.writeVariable("ednsPKTSize", dnsp.d_ednsRawPacketSizeLimit);
   ComboAddress bestwho;
   if(dnsp.hasEDNSSubnet()) {
     lua.writeVariable("ecswho", dnsp.getRealRemote());