From: Kees Monshouwer Date: Wed, 20 Jun 2018 11:59:05 +0000 (+0200) Subject: rec: update the validation state when we replace an existing entry in the packet... X-Git-Tag: dnsdist-1.3.1~25^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F6713%2Fhead;p=thirdparty%2Fpdns.git rec: update the validation state when we replace an existing entry in the packet cache --- diff --git a/pdns/recpacketcache.cc b/pdns/recpacketcache.cc index dd71eff8d8..653c1d4fdd 100644 --- a/pdns/recpacketcache.cc +++ b/pdns/recpacketcache.cc @@ -161,6 +161,7 @@ void RecursorPacketCache::insertResponsePacket(unsigned int tag, uint32_t qhash, iter->d_packet = responsePacket; iter->d_ttd = now + ttl; iter->d_creation = now; + iter->d_vstate = valState; #ifdef HAVE_PROTOBUF if (protobufMessage) { iter->d_protobufMessage = *protobufMessage; diff --git a/pdns/recpacketcache.hh b/pdns/recpacketcache.hh index 7293c55f16..77d8b419c2 100644 --- a/pdns/recpacketcache.hh +++ b/pdns/recpacketcache.hh @@ -87,7 +87,7 @@ private: #endif uint32_t d_qhash; uint32_t d_tag; - vState d_vstate; + mutable vState d_vstate; inline bool operator<(const struct Entry& rhs) const; time_t getTTD() const