]> granicus.if.org Git - pdns/commitdiff
fix up the non-lua case for recursor
authorbert hubert <bert.hubert@netherlabs.nl>
Fri, 18 Dec 2015 21:03:12 +0000 (22:03 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Fri, 18 Dec 2015 21:03:12 +0000 (22:03 +0100)
pdns/lua-recursor4.cc

index 3d688af642cfdfcaa1b91f4f40e6a64f6ff61a07..3fb0e54675717d84db76bb863fee295da39b7c7c 100644 (file)
@@ -1,11 +1,53 @@
 #include "lua-recursor4.hh"
 #include <fstream>
-#undef L
-#include "ext/luawrapper/include/LuaContext.hpp"
 #include "logger.hh"
 #include "dnsparser.hh"
 #include "syncres.hh"
 
+#if !defined(HAVE_LUA)
+
+RecursorLua4::RecursorLua4(const std::string &fname)
+{
+  // empty
+}
+
+bool RecursorLua4::nxdomain(const ComboAddress& remote,const ComboAddress& local, const DNSName& query, const QType& qtype, vector<DNSRecord>& ret, int& res, bool* variable)
+{
+  return false;
+}
+
+bool RecursorLua4::nodata(const ComboAddress& remote,const ComboAddress& local, const DNSName& query, const QType& qtype, vector<DNSRecord>& ret, int& res, bool* variable)
+{
+  return false;
+}
+
+bool RecursorLua4::postresolve(const ComboAddress& remote,const ComboAddress& local, const DNSName& query, const QType& qtype, vector<DNSRecord>& ret, int& res, bool* variable)
+{
+  return false;
+}
+
+
+bool RecursorLua4::preresolve(const ComboAddress& remote, const ComboAddress& local, const DNSName& query, const QType& qtype, vector<DNSRecord>& ret, int& res, bool* variable)
+{
+  return false;
+}
+
+bool RecursorLua4::preoutquery(const ComboAddress& remote, const ComboAddress& local,const DNSName& query, const QType& qtype, vector<DNSRecord>& ret, int& res)
+{
+  return false;
+}
+
+bool RecursorLua4::ipfilter(const ComboAddress& remote, const ComboAddress& local, const struct dnsheader& dh)
+{
+  return false;
+}
+
+
+#else
+#undef L
+#include "ext/luawrapper/include/LuaContext.hpp"
+
+
 static int followCNAMERecords(vector<DNSRecord>& ret, const QType& qtype)
 {
   vector<DNSRecord> resolved;
@@ -273,3 +315,4 @@ bool RecursorLua4::genhook(luacall_t& func, const ComboAddress& remote,const Com
   // see if they added followup work for us too
   return handled;
 }
+#endif