From: bert hubert Date: Fri, 18 Dec 2015 21:03:12 +0000 (+0100) Subject: fix up the non-lua case for recursor X-Git-Tag: dnsdist-1.0.0-alpha1~45^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=410d750cef5e2482452f9bec9434ff6edfe718b8;p=pdns fix up the non-lua case for recursor --- 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