From: Peter van Dijk Date: Tue, 29 Jan 2013 13:07:20 +0000 (+0000) Subject: drop auth-can-lower-ttl flag; instead we just try to honour rfc2181 always (as far... X-Git-Tag: rec-3.5-rc3~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9348824dd028c9b0dbce43dc58a317b7ef917239;p=thirdparty%2Fpdns.git drop auth-can-lower-ttl flag; instead we just try to honour rfc2181 always (as far as we can do that securely) git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3092 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 6b79582f46..a128ec6fc8 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -1858,7 +1858,6 @@ try L<d_followRFC2181=::arg().mustDo("auth-can-lower-ttl"); t_pdl = new shared_ptr(); 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"; diff --git a/pdns/recursor_cache.cc b/pdns/recursor_cache.cc index ece6b2dec9..5110387d89 100644 --- a/pdns/recursor_cache.cc +++ b/pdns/recursor_cache.cc @@ -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="<d_ttd - i->ttl<d_ttd=i->ttl; } diff --git a/pdns/recursor_cache.hh b/pdns/recursor_cache.hh index 18b9c301b0..4c4d73807d 100644 --- a/pdns/recursor_cache.hh +++ b/pdns/recursor_cache.hh @@ -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