From 1ef00ba12d33af62df043ce565bef46e0b79f553 Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Sat, 30 Sep 2006 12:22:22 +0000 Subject: [PATCH] add support for dropping broken nssets, and re-retrieving one from servers a level higher. Plus document 'nsset-invalidations' metric. Plus version number upgrade git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@896 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- pdns/docs/pdns.sgml | 5 +++-- pdns/pdns-recursor.spec | 4 ++-- pdns/rec_channel_rec.cc | 2 ++ pdns/recursor_cache.cc | 9 +++++++-- pdns/recursor_cache.hh | 2 +- pdns/syncres.cc | 7 ++++++- pdns/syncres.hh | 1 + 7 files changed, 22 insertions(+), 8 deletions(-) diff --git a/pdns/docs/pdns.sgml b/pdns/docs/pdns.sgml index 3b8bbeed8..46bd6b46b 100644 --- a/pdns/docs/pdns.sgml +++ b/pdns/docs/pdns.sgml @@ -81,9 +81,9 @@ Before proceeding, it is advised to check the release notes for your PDNS version, as specified in the name of the distribution file. - Recursor version 3.1.3 (unreleased) + Recursor version 3.1.3 - (not yet released) + Released the 12th of September 2006. Compared to 3.1.2, this release again consists of a number of mostly minor bug fixes, and some slight improvements. @@ -6924,6 +6924,7 @@ dlg-only-drops number of records dropped because of delegation only setting negcache-entries shows the number of entries in the Negative answer cache noerror-answers counts the number of times it answered NOERROR since starting nsspeeds-entries shows the number of entries in the NS speeds map +nsset-invalidations number of times an nsset was dropped because it no longer worked nxdomain-answers counts the number of times it answered NXDOMAIN since starting outgoing-timeouts counts the number of timeouts on outgoing UDP queries since starting qa-latency shows the current latency average diff --git a/pdns/pdns-recursor.spec b/pdns/pdns-recursor.spec index e83450252..4b817551e 100644 --- a/pdns/pdns-recursor.spec +++ b/pdns/pdns-recursor.spec @@ -2,10 +2,10 @@ Buildroot: /tmp/pdns/ Name: pdns-recursor -Version: 3.1.2 +Version: 3.1.3 Release: 1 Summary: extremely powerful and versatile recursing nameserver -Copyright: see /usr/doc/pdns/copyright +License: GPL Distribution: Neutral Vendor: PowerDNS.COM BV Group: System/DNS diff --git a/pdns/rec_channel_rec.cc b/pdns/rec_channel_rec.cc index 306d0b1bf..6b13e2b50 100644 --- a/pdns/rec_channel_rec.cc +++ b/pdns/rec_channel_rec.cc @@ -186,6 +186,8 @@ RecursorControlParser::RecursorControlParser() addGetStat("unexpected-packets", &g_stats.unexpectedCount); addGetStat("spoof-prevents", &g_stats.spoofCount); + addGetStat("nsset-invalidations", &g_stats.nsSetInvalidations); + addGetStat("resource-limits", &g_stats.resourceLimits); addGetStat("dlg-only-drops", &SyncRes::s_nodelegated); diff --git a/pdns/recursor_cache.cc b/pdns/recursor_cache.cc index 22009105c..afd430154 100644 --- a/pdns/recursor_cache.cc +++ b/pdns/recursor_cache.cc @@ -273,11 +273,16 @@ void MemRecursorCache::replace(time_t now, const string &qname, const QType& qt, d_cache.replace(stored, ce); } -int MemRecursorCache::doWipeCache(const string& name) +int MemRecursorCache::doWipeCache(const string& name, uint16_t qtype) { int count=0; d_cachecachevalid=false; - pair range=d_cache.equal_range(tie(name)); + pair range; + if(qtype==0xffff) + range=d_cache.equal_range(tie(name)); + else + range=d_cache.equal_range(tie(name, qtype)); + for(cache_t::const_iterator i=range.first; i != range.second; ) { count++; d_cache.erase(i++); diff --git a/pdns/recursor_cache.hh b/pdns/recursor_cache.hh index 7830ccb00..9b799de76 100644 --- a/pdns/recursor_cache.hh +++ b/pdns/recursor_cache.hh @@ -36,7 +36,7 @@ public: void doPrune(void); void doSlash(int perc); void doDumpAndClose(int fd); - int doWipeCache(const string& name); + int doWipeCache(const string& name, uint16_t qtype=0xffff); uint64_t cacheHits, cacheMisses; bool d_followRFC2181; diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 04a1e1054..6e5eb543c 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -603,7 +603,12 @@ int SyncRes::doResolveAt(set nameservers, string auth, for(vector::const_iterator tns=rnameservers.begin();;++tns) { if(tns==rnameservers.end()) { - LOG< remotes_t; remotes_t remotes; -- 2.50.0