From 4d3f74e85dc7ae562d95603fe3b5983b2963b1ca Mon Sep 17 00:00:00 2001 From: Kees Monshouwer Date: Wed, 20 Jun 2018 13:59:05 +0200 Subject: [PATCH] rec: update the validation state when we replace an existing entry in the packet cache --- pdns/recpacketcache.cc | 1 + pdns/recpacketcache.hh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pdns/recpacketcache.cc b/pdns/recpacketcache.cc index dd71eff8d..653c1d4fd 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 7293c55f1..77d8b419c 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 -- 2.40.0