]> granicus.if.org Git - pdns/commitdiff
drop auth-can-lower-ttl flag; instead we just try to honour rfc2181 always (as far...
authorPeter van Dijk <peter.van.dijk@netherlabs.nl>
Tue, 29 Jan 2013 13:07:20 +0000 (13:07 +0000)
committerPeter van Dijk <peter.van.dijk@netherlabs.nl>
Tue, 29 Jan 2013 13:07:20 +0000 (13:07 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3092 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/pdns_recursor.cc
pdns/recursor_cache.cc
pdns/recursor_cache.hh

index 6b79582f4609952465b2f29bf4d39c3cbb8b3041..a128ec6fc8babeef0bbc1071700b3cfe10f93548 100644 (file)
@@ -1858,7 +1858,6 @@ try
   
   L<<Logger::Warning<<"Done priming cache with root hints"<<endl;
     
-  t_RC->d_followRFC2181=::arg().mustDo("auth-can-lower-ttl");
   t_pdl = new shared_ptr<RecursorLua>();
   
   try {
@@ -2076,7 +2075,6 @@ int main(int argc, char **argv)
     ::arg().set("export-etc-hosts-search-suffix", "Also serve up the contents of /etc/hosts with this suffix")="";
     ::arg().set("etc-hosts-file", "Path to 'hosts' file")="/etc/hosts";
     ::arg().set("serve-rfc1918", "If we should be authoritative for RFC 1918 private IP space")="";
-    ::arg().set("auth-can-lower-ttl", "If we follow RFC 2181 to the letter, an authoritative server can lower the TTL of NS records")="off";
     ::arg().set("lua-dns-script", "Filename containing an optional 'lua' script that will be used to modify dns answers")="";
     ::arg().setSwitch( "ignore-rd-bit", "Assume each packet requires recursion, for compatibility" )= "off"; 
     ::arg().setSwitch( "disable-edns-ping", "Disable EDNSPing" )= "no"; 
index ece6b2dec9ee54f0a1468419b1ee7187c38f2336..5110387d890f70a898692f519e6cc9c17f0fbc65 100644 (file)
@@ -261,7 +261,7 @@ void MemRecursorCache::replace(time_t now, const string &qname, const QType& qt,
             //~ cerr<<"\t\tNot doing so, trying to raise TTL NS\n";
             continue;
           }
-          if(i->ttl > j->d_ttd || (auth && d_followRFC2181) ) { // authoritative packets can override the TTL to be lower
+          if(i->ttl > j->d_ttd || (auth) ) { // authoritative packets can override the TTL to be lower
             //~ cerr<<"\t\tUpdating the ttl, diff="<<j->d_ttd - i->ttl<<endl;;
             j->d_ttd=i->ttl;
           }
index 18b9c301b07441d415e4e351c3b1c2bdf66d62e0..4c4d73807d601a14080be9412301bcdb05dee955 100644 (file)
@@ -25,7 +25,7 @@ using namespace ::boost::multi_index;
 class MemRecursorCache : public boost::noncopyable //  : public RecursorCache
 {
 public:
-  MemRecursorCache() : d_followRFC2181(false), d_cachecachevalid(false)
+  MemRecursorCache() : d_cachecachevalid(false)
   {
     cacheHits = cacheMisses = 0;
   }
@@ -41,7 +41,6 @@ public:
   int doWipeCache(const string& name, uint16_t qtype=0xffff);
   bool doAgeCache(time_t now, const string& name, uint16_t qtype, int32_t newTTL);
   uint64_t cacheHits, cacheMisses;
-  bool d_followRFC2181;
 
 private:
   struct StoredRecord