]> granicus.if.org Git - pdns/commitdiff
rec: update the validation state when we replace an existing entry in the packet...
authorKees Monshouwer <mind04@monshouwer.org>
Wed, 20 Jun 2018 11:59:05 +0000 (13:59 +0200)
committermind04 <mind04@monshouwer.org>
Wed, 20 Jun 2018 12:04:00 +0000 (14:04 +0200)
pdns/recpacketcache.cc
pdns/recpacketcache.hh

index dd71eff8d85c96ad9588697d4bf2b612ded88e17..653c1d4fddbe1b40e2981d2d1e51e9d528fc3aef 100644 (file)
@@ -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;
index 7293c55f16bfcf83d3ad5c2c67fd0726ba7c400d..77d8b419c2bc15badc9687cdba7279584cd8a4dc 100644 (file)
@@ -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