From: Ondřej Surý Date: Wed, 29 Apr 2026 12:03:38 +0000 (+0200) Subject: Resolve ERR_MISSING_GLUE / ERR_EXTRA_AAAA value collision X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72d21a08063400d9a3e9c3d13ccc5ac28bf457c1;p=thirdparty%2Fbind9.git Resolve ERR_MISSING_GLUE / ERR_EXTRA_AAAA value collision Both constants were defined as 5. The symbol table used by checkns() to deduplicate log messages keys on (name, error_code), so logging an extra-AAAA error caused logged() to also return true for the missing-glue check, silently skipping the entire missing-glue block for the same name in named-checkzone and named-checkconf -z. Convert the ERR_* defines to an auto-numbered enum so the compiler guarantees the values stay pairwise distinct. Assisted-by: Claude:claude-opus-4-7 --- diff --git a/bin/check/check-tool.c b/bin/check/check-tool.c index 8d841cd758d..f0db14c7717 100644 --- a/bin/check/check-tool.c +++ b/bin/check/check-tool.c @@ -53,14 +53,16 @@ #define CHECK_LOCAL 1 #endif /* ifndef CHECK_LOCAL */ -#define ERR_IS_CNAME 1 -#define ERR_NO_ADDRESSES 2 -#define ERR_LOOKUP_FAILURE 3 -#define ERR_EXTRA_A 4 -#define ERR_EXTRA_AAAA 5 -#define ERR_MISSING_GLUE 5 -#define ERR_IS_MXCNAME 6 -#define ERR_IS_SRVCNAME 7 +enum { + ERR_IS_CNAME = 1, + ERR_NO_ADDRESSES, + ERR_LOOKUP_FAILURE, + ERR_EXTRA_A, + ERR_EXTRA_AAAA, + ERR_MISSING_GLUE, + ERR_IS_MXCNAME, + ERR_IS_SRVCNAME, +}; static const char *dbtype[] = { ZONEDB_DEFAULT };