From ebb2429ce8856c8f4ef3c4dc69ffc37e0f1ccf3e Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Mon, 17 Apr 2017 20:00:02 +0300 Subject: [PATCH] lua-auth: Drop axfrfilter It's no longer needed. --- pdns/lua-auth.cc | 76 ------------------------------------------------ pdns/lua-auth.hh | 1 - 2 files changed, 77 deletions(-) diff --git a/pdns/lua-auth.cc b/pdns/lua-auth.cc index 63447e235b..e5f9932571 100644 --- a/pdns/lua-auth.cc +++ b/pdns/lua-auth.cc @@ -46,11 +46,6 @@ string AuthLua::policycmd(const vector&parts) { return "no policy script loaded"; } -bool AuthLua::axfrfilter(const ComboAddress& remote, const DNSName& zone, const DNSResourceRecord& in, vector& out) -{ - return false; -} - #else @@ -78,77 +73,6 @@ AuthLua::AuthLua(const std::string &fname) pthread_mutex_init(&d_lock,0); } -bool AuthLua::axfrfilter(const ComboAddress& remote, const DNSName& zone, const DNSResourceRecord& in, vector& out) -{ - lua_getglobal(d_lua, "axfrfilter"); - if(!lua_isfunction(d_lua, -1)) { - // cerr<<"No such function 'axfrfilter'\n"; - lua_pop(d_lua, 1); - return false; - } - - lua_pushstring(d_lua, remote.toString().c_str() ); - lua_pushstring(d_lua, zone.toString().c_str() ); // FIXME400 expose DNSName to Lua? - lua_pushstring(d_lua, in.qname.toString().c_str() ); - lua_pushnumber(d_lua, in.qtype.getCode() ); - lua_pushnumber(d_lua, in.ttl ); - lua_pushstring(d_lua, in.content.c_str() ); - - if(lua_pcall(d_lua, 6, 2, 0)) { // error - string error=string("lua error in axfrfilter: ")+lua_tostring(d_lua, -1); - lua_pop(d_lua, 1); - throw runtime_error(error); - return false; - } - - int newres = (int)lua_tonumber(d_lua, 1); // did we handle it? - if(newres < 0) { - //cerr << "handler did not handle"<& out); DNSPacket* prequery(DNSPacket *p); int police(DNSPacket *req, DNSPacket *resp, bool isTcp=false); string policycmd(const vector&parts); -- 2.47.2