From 2b4133a32c20f550377a41a2e34d7653ba80eb65 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Wed, 6 Mar 2024 13:05:16 -0800 Subject: [PATCH] switch default zone database from "qp" to "qpzone" use the dns_qpmulti-based "qpzone" by default throughout BIND, instead of the existing dns_qp-based "qp", when creating zone databases. (cache databases still use "qp".) the "--with-zonedb" option has been updated in configure.ac to permit the use of both "qp" and "qpzone" databases. in zone.c there was a test that prevented any database type other than "qp" from hosting an RPZ. this was outdated, and has been removed. --- bin/check/check-tool.c | 2 +- configure.ac | 14 ++++++++------ lib/dns/zone.c | 10 ---------- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/bin/check/check-tool.c b/bin/check/check-tool.c index eba4e83d73..352d83acbf 100644 --- a/bin/check/check-tool.c +++ b/bin/check/check-tool.c @@ -73,7 +73,7 @@ #define ERR_IS_MXCNAME 6 #define ERR_IS_SRVCNAME 7 -static const char *dbtype[] = { "qpzone" }; +static const char *dbtype[] = { ZONEDB_DEFAULT }; int debug = 0; const char *journal = NULL; diff --git a/configure.ac b/configure.ac index 2df3d19a3b..ec2f505122 100644 --- a/configure.ac +++ b/configure.ac @@ -1570,22 +1570,24 @@ AS_IF([test -z "$DTRACE"], AC_SUBST([DTRACE]) # -# Which should be the default zone database, RBTDB or QPDB? -# [pairwise: --with-zonedb=qp, --with-zonedb=rbt] +# Which should be the default zone database, RBTDB, QPDB (based on dns_qp), +# or QPZONE (based on dns_qpmulti)? +# [pairwise: --with-zonedb=qp, --with-zonedb=qpzone, --with-zonedb=rbt] # AC_ARG_WITH([zonedb], - [AS_HELP_STRING([--with-zonedb=detect],[specify default zone database type (default is "qp")])], + [AS_HELP_STRING([--with-zonedb=detect],[specify default zone database type (default is "qpzone")])], [],[with_zonedb=qp]) -zonedb="qp" +zonedb="qpzone" AS_CASE([$with_zonedb], [RBT*|rbt*],[zonedb="rbt"], - [QP*|qp*],[], + [QP|qp],[zonedb="qp"], + [QPZ*|qpz*],[], [AC_MSG_ERROR([Unknown zone database type])] ) AC_DEFINE_UNQUOTED([ZONEDB_DEFAULT], ["$zonedb"], [Default zone database type]) # -# Which should be the default cache database, RBTDB or QPDB? +# Which should be the default zone database, RBTDB or QPDB (based on dns_qp)? # [pairwise: --with-cachedb=qp, --with-cachedb=rbt] # AC_ARG_WITH([cachedb], diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 16a467e292..25a682005d 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -1870,16 +1870,6 @@ dns_zone_isdynamic(dns_zone_t *zone, bool ignore_freeze) { isc_result_t dns_zone_rpz_enable(dns_zone_t *zone, dns_rpz_zones_t *rpzs, dns_rpz_num_t rpz_num) { - /* - * Only RBTDB zones can be used for response policy zones, - * because only they have the code to create the summary data. - * Only zones that are loaded instead of mmap()ed create the - * summary data and so can be policy zones. - */ - if (strcmp(zone->db_argv[0], "qp") != 0) { - return (ISC_R_NOTIMPLEMENTED); - } - /* * This must happen only once or be redundant. */