From 3beb3b25c0e1900d549bf5158d4fbd63d136af5f Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Thu, 10 Nov 2016 13:56:58 +0100 Subject: [PATCH] On (re-)priming, fetch the root NS records --- pdns/pdns_recursor.cc | 71 +++++++++++++++++++++++++------------------ pdns/reczones.cc | 2 +- pdns/syncres.cc | 2 ++ pdns/syncres.hh | 1 + 4 files changed, 46 insertions(+), 30 deletions(-) diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 079ca11a0..91110054c 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -1937,35 +1937,9 @@ static void houseKeeping(void *) } if(now.tv_sec - last_rootupdate > 7200) { - SyncRes sr(now); - sr.setDoEDNS0(true); - vector ret; - - sr.setNoCache(); - int res=-1; - try { - res=sr.beginResolve(DNSName("."), QType(QType::NS), 1, ret); - } - catch(PDNSException& e) - { - L<>(), true); // and stuff in the cache (auth) + t_RC->replace(time(0), DNSName("."), QType(QType::NS), nsset, vector>(), false); // and stuff in the cache (auth) } static void makeNameToIPZone(SyncRes::domainmap_t* newMap, const DNSName& hostname, const string& ip) diff --git a/pdns/syncres.cc b/pdns/syncres.cc index a3455f057..0754e5a82 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -632,8 +632,10 @@ void SyncRes::getBestNSFromCache(const DNSName &qname, const QType& qtype, vecto LOG(prefix<