From 2bcd6c2fd37e993e224430e9134fda813b6dcadf Mon Sep 17 00:00:00 2001 From: Aram Sargsyan Date: Wed, 31 Jan 2024 13:01:13 +0000 Subject: [PATCH] Fix the DNS_GETDB_STALEFIRST flag 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. (cherry picked from commit be7d8fafe292424ba0fdecf6687c5c72f85a25d1) --- lib/ns/query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ns/query.c b/lib/ns/query.c index 7c98d1ab47..9a55746023 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -197,7 +197,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)