From: Bert Hubert Date: Thu, 9 Jun 2011 13:14:28 +0000 (+0000) Subject: Christoph Meerwald discovered that our 'SOA freshness checking' actually also looked... X-Git-Tag: auth-3.0~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=965f9774bca2f6ee2a487afef052e6c7283fc060;p=pdns Christoph Meerwald discovered that our 'SOA freshness checking' actually also looked at the freshness of non-SOA responses. git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2209 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/resolver.cc b/pdns/resolver.cc index f043baad4..3338ace46 100644 --- a/pdns/resolver.cc +++ b/pdns/resolver.cc @@ -238,8 +238,10 @@ bool Resolver::tryGetSOASerial(string* domain, uint32_t *theirSerial, uint32_t * } if(drc.first.d_type == QType::RRSIG) { shared_ptr rrc=boost::dynamic_pointer_cast(drc.first.d_content); - *theirInception= std::max(*theirInception, rrc->d_siginception); - *theirExpire = std::max(*theirExpire, rrc->d_sigexpire); + if(rrc->d_type == QType::SOA) { + *theirInception= std::max(*theirInception, rrc->d_siginception); + *theirExpire = std::max(*theirExpire, rrc->d_sigexpire); + } } } if(!gotSOA)