From 3024c67000cd4c2ce16aa2a2db566acdc9ddfe10 Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Sun, 28 Feb 2010 13:47:56 +0000 Subject: [PATCH] the ever vigilant Imre Gergely spotted that PowerDNS tries to reprime its root hints sometimes, when this should not be necessary. Discovered because this generated an 'out of file descriptors' error, because of the use of root hints. git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1531 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- pdns/syncres.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pdns/syncres.cc b/pdns/syncres.cc index c1bcb3626..fb8bba57a 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -405,8 +405,15 @@ int SyncRes::doResolve(const string &qname, const QType &qtype, vector rootset; + /* this additional test is needed since getBestNSNamesFromCache sometimes returns that no + useful NS records were found, even without the root being expired. This might for example + be the case when the . records are not acceptable because they are part of a loop, a loop + caused by the invalidation of an nsset during the resolution algorithm */ + if(t_RC->get(d_now.tv_sec, ".", QType(QType::NS), &rootset) <= 0) { + L<