2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 21:47:59 +00:00

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.
This commit is contained in:
Evan Hunt 2024-03-06 13:05:16 -08:00
parent 2222728a4f
commit 2b4133a32c
3 changed files with 9 additions and 17 deletions

View File

@ -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;

View File

@ -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],

View File

@ -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.
*/