aboutsummaryrefslogtreecommitdiff
path: root/dns
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2020-08-21 09:11:48 +0000
committerMathieu Arnold <mat@FreeBSD.org>2020-08-21 09:11:48 +0000
commit08020e28aca7dceaed7fa157029ef278b1aa04d0 (patch)
tree2eb2c220715b99d37c85db75718d17ad45ed3c66 /dns
parent1e06fc8e4e31a4a9ca7824d093f86acafefabcf2 (diff)
downloadports-08020e28aca7dceaed7fa157029ef278b1aa04d0.tar.gz
ports-08020e28aca7dceaed7fa157029ef278b1aa04d0.zip
Notes
Diffstat (limited to 'dns')
-rw-r--r--dns/bind911/Makefile5
-rw-r--r--dns/bind911/distinfo6
-rw-r--r--dns/bind911/files/extrapatch-bind-lmdb-lock235
3 files changed, 5 insertions, 241 deletions
diff --git a/dns/bind911/Makefile b/dns/bind911/Makefile
index af9d9b725ef1..f3d0f7a19883 100644
--- a/dns/bind911/Makefile
+++ b/dns/bind911/Makefile
@@ -3,7 +3,7 @@
PORTNAME= bind
PORTVERSION= ${ISCVERSION:S/-P/P/:S/b/.b/:S/a/.a/:S/rc/.rc/}
-PORTREVISION= 1
+PORTREVISION= 0
CATEGORIES= dns net
MASTER_SITES= ISC/bind9/${ISCVERSION}
PKGNAMESUFFIX= 911
@@ -24,7 +24,7 @@ RUN_DEPENDS= bind-tools>0:dns/bind-tools
USES= cpe libedit pkgconfig
# ISC releases things like 9.8.0-P1, which our versioning doesn't like
-ISCVERSION= 9.11.21
+ISCVERSION= 9.11.22
CPE_VENDOR= isc
CPE_VERSION= ${ISCVERSION:C/-.*//}
@@ -159,7 +159,6 @@ LARGE_FILE_CONFIGURE_ENABLE= largefile
LMDB_CONFIGURE_WITH= lmdb=${LOCALBASE}
LMDB_LIB_DEPENDS= liblmdb.so:databases/lmdb
-LMDB_EXTRA_PATCHES= ${FILESDIR}/extrapatch-bind-lmdb-lock
MINCACHE_EXTRA_PATCHES= ${FILESDIR}/extrapatch-bind-min-override-ttl
diff --git a/dns/bind911/distinfo b/dns/bind911/distinfo
index b82c01070c18..e51775d9a093 100644
--- a/dns/bind911/distinfo
+++ b/dns/bind911/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1594913197
-SHA256 (bind-9.11.21.tar.gz) = 668158b005b3de4328fa0dbbbb3f524b66f28f024c67538aa9412a9e69c9dfbc
-SIZE (bind-9.11.21.tar.gz) = 8248982
+TIMESTAMP = 1597735112
+SHA256 (bind-9.11.22.tar.gz) = afc6d8015006f1cabf699ff19f517bb8fd9c1811e5231f26baf51c3550262ac9
+SIZE (bind-9.11.22.tar.gz) = 8248081
diff --git a/dns/bind911/files/extrapatch-bind-lmdb-lock b/dns/bind911/files/extrapatch-bind-lmdb-lock
deleted file mode 100644
index 310881929cbd..000000000000
--- a/dns/bind911/files/extrapatch-bind-lmdb-lock
+++ /dev/null
@@ -1,235 +0,0 @@
---- bin/named/server.c.orig 2020-06-10 18:00:37 UTC
-+++ bin/named/server.c
-@@ -6797,6 +6797,8 @@ count_newzones(dns_view_t *view, ns_cfgctx_t *nzcfg, i
- "for view '%s'",
- view->new_zone_db, view->name);
-
-+ LOCK(&view->new_zone_lock);
-+
- CHECK(nzd_count(view, &n));
-
- *num_zonesp = n;
-@@ -6811,6 +6813,8 @@ count_newzones(dns_view_t *view, ns_cfgctx_t *nzcfg, i
- if (result != ISC_R_SUCCESS)
- *num_zonesp = 0;
-
-+ UNLOCK(&view->new_zone_lock);
-+
- return (ISC_R_SUCCESS);
- }
-
-@@ -7116,6 +7120,8 @@ typedef isc_result_t (*newzone_cfg_cb_t)(const cfg_obj
- * Immediately interrupt processing if an error is encountered while
- * transforming NZD data into a zone configuration object or if "callback"
- * returns an error.
-+ *
-+ * Caller must hold 'view->new_zone_lock'.
- */
- static isc_result_t
- for_all_newzone_cfgs(newzone_cfg_cb_t callback, cfg_obj_t *config,
-@@ -7228,8 +7234,11 @@ configure_newzones(dns_view_t *view, cfg_obj_t *config
- return (ISC_R_SUCCESS);
- }
-
-+ LOCK(&view->new_zone_lock);
-+
- result = nzd_open(view, MDB_RDONLY, &txn, &dbi);
- if (result != ISC_R_SUCCESS) {
-+ UNLOCK(&view->new_zone_lock);
- return (ISC_R_SUCCESS);
- }
-
-@@ -7256,6 +7265,9 @@ configure_newzones(dns_view_t *view, cfg_obj_t *config
- }
-
- (void) nzd_close(&txn, false);
-+
-+ UNLOCK(&view->new_zone_lock);
-+
- return (result);
- }
-
-@@ -7277,6 +7289,8 @@ get_newzone_config(dns_view_t *view, const char *zonen
-
- INSIST(zoneconfig != NULL && *zoneconfig == NULL);
-
-+ LOCK(&view->new_zone_lock);
-+
- CHECK(nzd_open(view, MDB_RDONLY, &txn, &dbi));
-
- isc_log_write(ns_g_lctx,
-@@ -7310,6 +7324,8 @@ get_newzone_config(dns_view_t *view, const char *zonen
- cleanup:
- (void) nzd_close(&txn, false);
-
-+ UNLOCK(&view->new_zone_lock);
-+
- if (zoneconf != NULL) {
- cfg_obj_destroy(ns_g_addparser, &zoneconf);
- }
-@@ -11638,8 +11654,6 @@ nzd_save(MDB_txn **txnp, MDB_dbi dbi, dns_zone_t *zone
-
- nzd_setkey(&key, dns_zone_getorigin(zone), namebuf, sizeof(namebuf));
-
-- LOCK(&view->new_zone_lock);
--
- if (zconfig == NULL) {
- /* We're deleting the zone from the database */
- status = mdb_del(*txnp, dbi, &key, NULL);
-@@ -11739,8 +11753,6 @@ nzd_save(MDB_txn **txnp, MDB_dbi dbi, dns_zone_t *zone
- }
- *txnp = NULL;
-
-- UNLOCK(&view->new_zone_lock);
--
- if (text != NULL) {
- isc_buffer_free(&text);
- }
-@@ -11748,6 +11760,11 @@ nzd_save(MDB_txn **txnp, MDB_dbi dbi, dns_zone_t *zone
- return (result);
- }
-
-+/*
-+ * Check whether the new zone database for 'view' can be opened for writing.
-+ *
-+ * Caller must hold 'view->new_zone_lock'.
-+ */
- static isc_result_t
- nzd_writable(dns_view_t *view) {
- isc_result_t result = ISC_R_SUCCESS;
-@@ -11779,6 +11796,11 @@ nzd_writable(dns_view_t *view) {
- return (result);
- }
-
-+/*
-+ * Open the new zone database for 'view' and start a transaction for it.
-+ *
-+ * Caller must hold 'view->new_zone_lock'.
-+ */
- static isc_result_t
- nzd_open(dns_view_t *view, unsigned int flags, MDB_txn **txnp, MDB_dbi *dbi) {
- int status;
-@@ -11909,6 +11931,13 @@ nzd_env_reopen(dns_view_t *view) {
- return (result);
- }
-
-+/*
-+ * If 'commit' is true, commit the new zone database transaction pointed to by
-+ * 'txnp'; otherwise, abort that transaction.
-+ *
-+ * Caller must hold 'view->new_zone_lock' for the view that the transaction
-+ * pointed to by 'txnp' was started for.
-+ */
- static isc_result_t
- nzd_close(MDB_txn **txnp, bool commit) {
- isc_result_t result = ISC_R_SUCCESS;
-@@ -11931,6 +11960,12 @@ nzd_close(MDB_txn **txnp, bool commit) {
- return (result);
- }
-
-+/*
-+ * Count the zones configured in the new zone database for 'view' and store the
-+ * result in 'countp'.
-+ *
-+ * Caller must hold 'view->new_zone_lock'.
-+ */
- static isc_result_t
- nzd_count(dns_view_t *view, int *countp) {
- isc_result_t result;
-@@ -11979,6 +12014,8 @@ migrate_nzf(dns_view_t *view) {
- MDB_val key, data;
- ns_dzarg_t dzarg;
-
-+ LOCK(&view->new_zone_lock);
-+
- /*
- * If NZF file doesn't exist, or NZD DB exists and already
- * has data, return without attempting migration.
-@@ -12122,6 +12159,8 @@ migrate_nzf(dns_view_t *view) {
- result = nzd_close(&txn, commit);
- }
-
-+ UNLOCK(&view->new_zone_lock);
-+
- if (text != NULL) {
- isc_buffer_free(&text);
- }
-@@ -12325,6 +12364,7 @@ do_addzone(ns_server_t *server, ns_cfgctx_t *cfg, dns_
- MDB_dbi dbi;
-
- UNUSED(zoneconf);
-+ LOCK(&view->new_zone_lock);
- #endif /* HAVE_LMDB */
-
- /* Zone shouldn't already exist */
-@@ -12465,6 +12505,7 @@ do_addzone(ns_server_t *server, ns_cfgctx_t *cfg, dns_
- #else /* HAVE_LMDB */
- if (txn != NULL)
- (void) nzd_close(&txn, false);
-+ UNLOCK(&view->new_zone_lock);
- #endif /* HAVE_LMDB */
-
- if (zone != NULL)
-@@ -12488,6 +12529,7 @@ do_modzone(ns_server_t *server, ns_cfgctx_t *cfg, dns_
- #else /* HAVE_LMDB */
- MDB_txn *txn = NULL;
- MDB_dbi dbi;
-+ LOCK(&view->new_zone_lock);
- #endif /* HAVE_LMDB */
-
- /* Zone must already exist */
-@@ -12667,6 +12709,7 @@ do_modzone(ns_server_t *server, ns_cfgctx_t *cfg, dns_
- #else /* HAVE_LMDB */
- if (txn != NULL)
- (void) nzd_close(&txn, false);
-+ UNLOCK(&view->new_zone_lock);
- #endif /* HAVE_LMDB */
-
- if (zone != NULL)
-@@ -12816,6 +12859,7 @@ rmzone(isc_task_t *task, isc_event_t *event) {
- if (added && cfg != NULL) {
- #ifdef HAVE_LMDB
- /* Make sure we can open the NZD database */
-+ LOCK(&view->new_zone_lock);
- result = nzd_open(view, 0, &txn, &dbi);
- if (result != ISC_R_SUCCESS) {
- isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
-@@ -12834,6 +12878,11 @@ rmzone(isc_task_t *task, isc_event_t *event) {
- "delete zone configuration: %s",
- isc_result_totext(result));
- }
-+
-+ if (txn != NULL) {
-+ (void)nzd_close(&txn, false);
-+ }
-+ UNLOCK(&view->new_zone_lock);
- #else
- result = delete_zoneconf(view, cfg->add_parser,
- cfg->nzf_config,
-@@ -12926,10 +12975,6 @@ rmzone(isc_task_t *task, isc_event_t *event) {
- }
- }
-
--#ifdef HAVE_LMDB
-- if (txn != NULL)
-- (void) nzd_close(&txn, false);
--#endif
- if (raw != NULL)
- dns_zone_detach(&raw);
- dns_zone_detach(&zone);
---- lib/dns/include/dns/view.h.orig 2020-06-10 18:00:37 UTC
-+++ lib/dns/include/dns/view.h
-@@ -240,12 +240,7 @@ struct dns_view {
-
- #ifdef HAVE_LMDB
- #include <lmdb.h>
--/*
-- * MDB_NOTLS is used to prevent problems after configuration is reloaded, due
-- * to the way LMDB's use of thread-local storage (TLS) interacts with the BIND9
-- * thread model.
-- */
--#define DNS_LMDB_COMMON_FLAGS (MDB_CREATE | MDB_NOSUBDIR | MDB_NOTLS)
-+#define DNS_LMDB_COMMON_FLAGS (MDB_CREATE | MDB_NOSUBDIR | MDB_NOLOCK)
- #ifndef __OpenBSD__
- #define DNS_LMDB_FLAGS (DNS_LMDB_COMMON_FLAGS)
- #else /* __OpenBSD__ */