From 1be57227a9727c6dce501a4bfa8e9eef35ba95d5 Mon Sep 17 00:00:00 2001 From: Petr Menšík Date: Mar 22 2023 14:14:45 +0000 Subject: Remove rpz_attach for BIND 9.16+ rpz_attach is never supplied from BIND9 code both in 9.16 or 9.18. Remove our custom function and pass NULL as well. It would be never called anyway. Effectivery reverts most of previous commit. --- diff --git a/configure.ac b/configure.ac index 16e61c6..9f7f364 100644 --- a/configure.ac +++ b/configure.ac @@ -160,14 +160,6 @@ int main(void) { [AC_MSG_ERROR([Cross compiling is not supported.])] ) -# Check db_registered -AC_CHECK_HEADER(dns/rpz.h, [], [AC_MSG_ERROR([dns/rpz.h not found])]) -AC_CHECK_MEMBER([struct dns_rpz_zone.db_registered], - [AC_DEFINE([HAVE_DB_REGISTERED], [1], - [Struct dns_rpz_zone has db_registered])], - [AC_MSG_NOTICE([Struct dns_rpz_zone has no db_registered])], - [[#include ]]) - dnl dns_db_setservestalettl() can be backported, detect support AC_CHECK_LIB([dns], [dns_db_setservestalettl], [AC_DEFINE([HAVE_DNS_SERVESTALE], 1, [Define if dns library provides dns_db_setservestalettl])] diff --git a/src/ldap_driver.c b/src/ldap_driver.c index 7f250b9..20e12fc 100644 --- a/src/ldap_driver.c +++ b/src/ldap_driver.c @@ -804,24 +804,6 @@ rpz_attach(dns_db_t *db, dns_rpz_zones_t *rpzs, uint8_t rpz_num) dns_db_rpz_attach(ldapdb->rbtdb, rpzs, rpz_num); } -#else -void -rpz_attach(dns_db_t *db, void *void_rpzs, uint8_t rpz_num) -{ - ldapdb_t *ldapdb = (ldapdb_t *) db; - dns_rpz_zones_t *rpzs = (dns_rpz_zones_t *) void_rpzs; - isc_result_t result; - - REQUIRE(VALID_LDAPDB(ldapdb)); - -#if defined(HAVE_DB_REGISTERED) - rpzs->zones[rpz_num]->db_registered = true; -#endif - result = dns_db_updatenotify_register(ldapdb->rbtdb, - dns_rpz_dbupdate_callback, - rpzs->zones[rpz_num]); - REQUIRE(result == ISC_R_SUCCESS); -} #endif /* @@ -968,7 +950,11 @@ static dns_dbmethods_t ldapdb_methods = { resigned, isdnssec, getrrsetstats, +#if LIBDNS_VERSION_MAJOR < 1600 rpz_attach, +#else + NULL, +#endif NULL, /* rpz_ready */ findnodeext, findext,