]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Merge branch 'master' into features/no-ttl-zero-cacherep
authorYorgos Thessalonikefs <yorgos@nlnetlabs.nl>
Fri, 12 Sep 2025 13:24:06 +0000 (15:24 +0200)
committerYorgos Thessalonikefs <yorgos@nlnetlabs.nl>
Fri, 12 Sep 2025 13:24:06 +0000 (15:24 +0200)
1  2 
cachedb/cachedb.c
daemon/worker.c
services/authzone.c
services/localzone.c
services/mesh.c
services/rpz.c
testcode/unitmain.c
util/data/msgencode.c
util/data/msgencode.h

Simple merge
diff --cc daemon/worker.c
Simple merge
Simple merge
Simple merge
diff --cc services/mesh.c
Simple merge
diff --cc services/rpz.c
Simple merge
Simple merge
index 3129018db90f0cf46fd155563f2cf671c46f4ba5,84aa3b9e75aeea7363bc40da8ef694088e7e0a81..b389800d01938330448f24275bab236bdd2cd388
@@@ -1021,18 -1021,7 +1021,18 @@@ reply_info_answer_encode(struct query_i
                flags |= BIT_AA;
                flags &= ~BIT_AD;
        }
-       log_assert(flags & BIT_QR); /* QR bit must be on in our replies */
+       log_assert((flags & BIT_QR)); /* QR bit must be on in our replies */
 +      if(cached_ttl && rep->ttl - timenow == 0) {
 +              /* The last remaining second of the TTL for a cached response
 +               * is replied. This makes a 0 in the protocol message. The
 +               * response is valid for the cache, but the DNS TTL 0 item
 +               * causes the received to drop the contents. Even though the
 +               * contents are cachable, so the time used is decremented
 +               * to change that into 1 second, and it can be cached, and
 +               * used for expired response generation, and does not give
 +               * repeated queries during that last second. */
 +              timenow --;
 +      }
        if(udpsize < LDNS_HEADER_SIZE)
                return 0;
        /* currently edns does not change during calculations;
Simple merge