]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_10_0_release] SIT/max-cache-size flag collision v9.10.0
authorEvan Hunt <each@isc.org>
Mon, 28 Apr 2014 19:18:53 +0000 (12:18 -0700)
committerEvan Hunt <each@isc.org>
Mon, 28 Apr 2014 19:18:53 +0000 (12:18 -0700)
3824. [bug] A collision between two flag values could cause
problems with cache cleaning when SIT was enabled.
[RT #35858]

(cherry picked from commit e01fbe2a45f9641968264a3bdf76d290e20521d7)

CHANGES
lib/dns/adb.c
lib/dns/include/dns/resolver.h

diff --git a/CHANGES b/CHANGES
index 74e3ff303373ac697ae5c3edf7fbd96f74739db0..cbb32d797a7ea03861a98a9a9bf424fd45e7db02 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
        --- 9.10.0 released ---
 
+3824.  [bug]           A collision between two flag values could cause
+                       problems with cache cleaning when SIT was enabled.
+                       [RT #35858]
+
        --- 9.10.0rc2 released ---
 
 3817.  [func]          The "delve" command is now spelled "delv" to avoid
index f65e744efd725468f51f1ca00a53eee734814eb8..a3ce67f049d225ca67f8e13f6902c638889fccaf 100644 (file)
@@ -357,7 +357,7 @@ static void dump_entry(FILE *, dns_adbentry_t *, isc_boolean_t, isc_stdtime_t);
  * Private flag(s) for entries.
  * MUST NOT overlap FCTX_ADDRINFO_xxx and DNS_FETCHOPT_NOEDNS0.
  */
-#define ENTRY_IS_DEAD          0x80000000
+#define ENTRY_IS_DEAD          0x00400000
 
 /*
  * To the name, address classes are all that really exist.  If it has a
@@ -4041,6 +4041,9 @@ dns_adb_changeflags(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
        REQUIRE(DNS_ADB_VALID(adb));
        REQUIRE(DNS_ADBADDRINFO_VALID(addr));
 
+       REQUIRE((bits & ENTRY_IS_DEAD) == 0);
+       REQUIRE((mask & ENTRY_IS_DEAD) == 0);
+
        bucket = addr->entry->lock_bucket;
        LOCK(&adb->entrylocks[bucket]);
 
index 33b4f9e27dfdd12e50547b549b0b582b4056e98c..c1afa26fa989bb25af878cbe4e95930a00609c4b 100644 (file)
@@ -99,6 +99,7 @@ typedef struct dns_fetchevent {
 #define DNS_FETCHOPT_PREFETCH          0x100         /*%< Request NSID */
 #define DNS_FETCHOPT_NOCDFLAG          0x200        /*%< Don't set CD flag. */
 
+/* Reserved in use by adb.c            0x00400000 */
 #define        DNS_FETCHOPT_EDNSVERSIONSET     0x00800000
 #define        DNS_FETCHOPT_EDNSVERSIONMASK    0xff000000
 #define        DNS_FETCHOPT_EDNSVERSIONSHIFT   24