]> granicus.if.org Git - pdns/commitdiff
remove recursor= leftovers
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Fri, 9 Mar 2018 13:34:12 +0000 (14:34 +0100)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Mon, 12 Mar 2018 14:53:18 +0000 (15:53 +0100)
(cherry picked from commit 7d338903e25cc9c3301a7bc9b323d1a739fc5107)

pdns/common_startup.cc
pdns/dnsproxy.cc
pdns/dnsproxy.hh

index 4c74222c9687a532541a1ea6ba87f62332cc5196..de5ed573ae77f6599e06f7dfbac8e0ceeee2bab6 100644 (file)
@@ -515,7 +515,6 @@ void mainthread()
   AuthWebServer webserver;
   Utility::dropUserPrivs(newuid);
 
-  // We need to start the Recursor Proxy before doing secpoll, see issue #2453
   if(::arg().mustDo("resolver")){
     DP=new DNSProxy(::arg()["resolver"]);
     DP->go();
index bee70a86a09f71f77b98bb00e2f1ecbd9c20ff4f..8936436fd1cf0eb52ae4eecb33c46987474194e3 100644 (file)
@@ -81,38 +81,6 @@ void DNSProxy::go()
   pthread_create(&tid,0,&launchhelper,this);
 }
 
-/** returns false if p->remote is not allowed to recurse via us */
-bool DNSProxy::sendPacket(DNSPacket *p)
-{
-  uint16_t id;
-  {
-    Lock l(&d_lock);
-    id=getID_locked();
-
-    ConntrackEntry ce;
-    ce.id       = p->d.id;
-    ce.remote = p->d_remote;
-    ce.outsock  = p->getSocket();
-    ce.created  = time( NULL );
-    ce.qtype = p->qtype.getCode();
-    ce.qname = p->qdomain;
-    ce.anyLocal = p->d_anyLocal;
-    ce.complete=0;
-    d_conntrack[id]=ce;
-  }
-  p->d.id=id^d_xor;
-  p->commitD();
-  
-  const string& buffer = p->getString();
-  
-  if(send(d_sock,buffer.c_str(), buffer.length() , 0)<0) { // zoom
-    L<<Logger::Error<<"Unable to send a packet to our recursing backend: "<<stringerror()<<endl;
-  }
-  (*d_resquestions)++;
-  return true;
-
-}
-
 //! look up qname aname with r->qtype, plonk it in the answer section of 'r' with name target
 bool DNSProxy::completePacket(DNSPacket *r, const DNSName& target,const DNSName& aname)
 {
index f927c86a7a86cb1c20a458ab7e02e9bafbffa1f8..040fe1dca11dc73d831e47fb4afb4b0b8c4ad98b 100644 (file)
@@ -54,7 +54,6 @@ public:
   DNSProxy(const string &ip); //!< creates socket
   ~DNSProxy(); //<! dtor for DNSProxy
   void go(); //!< launches the actual thread
-  bool sendPacket(DNSPacket *p);    //!< send out a packet and make a conntrack entry to we can send back the answer
   bool completePacket(DNSPacket *r, const DNSName& target,const DNSName& aname);
 
   void mainloop();                  //!< this is the main loop that receives reply packets and sends them out again