From 410d750cef5e2482452f9bec9434ff6edfe718b8 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Fri, 18 Dec 2015 22:03:12 +0100 Subject: [PATCH] fix up the non-lua case for recursor --- pdns/lua-recursor4.cc | 47 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/pdns/lua-recursor4.cc b/pdns/lua-recursor4.cc index 3d688af64..3fb0e5467 100644 --- a/pdns/lua-recursor4.cc +++ b/pdns/lua-recursor4.cc @@ -1,11 +1,53 @@ #include "lua-recursor4.hh" #include -#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& ret, int& res, bool* variable) +{ + return false; +} + +bool RecursorLua4::nodata(const ComboAddress& remote,const ComboAddress& local, const DNSName& query, const QType& qtype, vector& ret, int& res, bool* variable) +{ + return false; +} + +bool RecursorLua4::postresolve(const ComboAddress& remote,const ComboAddress& local, const DNSName& query, const QType& qtype, vector& ret, int& res, bool* variable) +{ + return false; +} + + +bool RecursorLua4::preresolve(const ComboAddress& remote, const ComboAddress& local, const DNSName& query, const QType& qtype, vector& ret, int& res, bool* variable) +{ + return false; +} + +bool RecursorLua4::preoutquery(const ComboAddress& remote, const ComboAddress& local,const DNSName& query, const QType& qtype, vector& 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& ret, const QType& qtype) { vector 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 -- 2.40.0