]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix the DNS_GETDB_STALEFIRST flag
authorAram Sargsyan <aram@isc.org>
Wed, 31 Jan 2024 13:01:13 +0000 (13:01 +0000)
committerAram Sargsyan <aram@isc.org>
Fri, 2 Feb 2024 13:50:57 +0000 (13:50 +0000)
The DNS_GETDB_STALEFIRST flag is defined as 0x0C, which is the
combination of the DNS_GETDB_PARTIAL (0x04) and the
DNS_GETDB_IGNOREACL (0x08) flags (0x04 | 0x08 == 0x0C) , which is
an obvious error.

All the flags should be power of two, so they don't interfere with
each other. Fix the DNS_GETDB_STALEFIRST flag by setting it to 0x10.

lib/ns/query.c

index 34e47e2b1e0fc151e484b44528298f322fdc7ab2..01775033f52c59cb91b9d1be72d78aadf2535732 100644 (file)
@@ -200,7 +200,7 @@ client_trace(ns_client_t *client, int level, const char *message) {
 #define DNS_GETDB_NOLOG             0x02U
 #define DNS_GETDB_PARTIAL    0x04U
 #define DNS_GETDB_IGNOREACL  0x08U
-#define DNS_GETDB_STALEFIRST 0X0CU
+#define DNS_GETDB_STALEFIRST 0X10U
 
 #define PENDINGOK(x) (((x) & DNS_DBFIND_PENDINGOK) != 0)