]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
remove allow-recursion option
authorKees Monshouwer <mind04@monshouwer.org>
Mon, 24 Oct 2016 20:22:42 +0000 (22:22 +0200)
committermind04 <mind04@monshouwer.org>
Mon, 9 Jan 2017 12:26:45 +0000 (13:26 +0100)
pdns/common_startup.cc
pdns/dnsproxy.cc
pdns/dnsproxy.hh

index 997fbec20bbb6b1e8b03efd38d36cc8aa78f7e65..2030c94abd74d7c5e9403e30751c34a61b3f7286 100644 (file)
@@ -99,8 +99,7 @@ void declareArguments()
   ::arg().set("signing-threads","Default number of signer threads to start")="3";
   ::arg().set("receiver-threads","Default number of receiver threads to start")="1";
   ::arg().set("queue-limit","Maximum number of milliseconds to queue a query")="1500"; 
-  ::arg().set("recursor","If recursion is desired, IP address of a recursing nameserver")="no"; 
-  ::arg().set("allow-recursion","List of subnets that are allowed to recurse")="0.0.0.0/0";
+  ::arg().set("recursor","If alias expansion is desired, IP address of a recursing nameserver")="no";
   ::arg().set("udp-truncation-threshold", "Maximum UDP response size before we truncate")="1680";
   ::arg().set("disable-tcp","Do not listen to TCP queries")="no";
   
@@ -512,7 +511,6 @@ void mainthread()
   // We need to start the Recursor Proxy before doing secpoll, see issue #2453
   if(::arg().mustDo("recursor")){
     DP=new DNSProxy(::arg()["recursor"]);
-    DP->onlyFrom(::arg()["allow-recursion"]);
     DP->go();
   }
 
index 0c300b086f946df897cc42bc5d66b83259b177a7..b0849497b05b0315d4fb02c7f36702d1c2c86cea 100644 (file)
@@ -79,23 +79,9 @@ void DNSProxy::go()
   pthread_create(&tid,0,&launchhelper,this);
 }
 
-
-void DNSProxy::onlyFrom(const string &ips)
-{
-  d_ng.toMasks(ips);
-}
-
-bool DNSProxy::recurseFor(DNSPacket* p)
-{
-  return d_ng.match((ComboAddress *)&p->d_remote);
-}
-
 /** returns false if p->remote is not allowed to recurse via us */
 bool DNSProxy::sendPacket(DNSPacket *p)
 {
-  if(!recurseFor(p))
-    return false;
-
   uint16_t id;
   {
     Lock l(&d_lock);
index 61447709109e21fcde6edae7d8b345c96a645bf8..f927c86a7a86cb1c20a458ab7e02e9bafbffa1f8 100644 (file)
@@ -54,7 +54,6 @@ public:
   DNSProxy(const string &ip); //!< creates socket
   ~DNSProxy(); //<! dtor for DNSProxy
   void go(); //!< launches the actual thread
-  void onlyFrom(const string &ips); //!< Only these netmasks are allowed to recurse via us
   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);
 
@@ -82,7 +81,6 @@ private:
   typedef map<int,ConntrackEntry> map_t;
 
   // Data
-  NetmaskGroup d_ng;
   AtomicCounter* d_resanswers;
   AtomicCounter* d_udpanswers;
   AtomicCounter* d_resquestions;