summaryrefslogtreecommitdiff
path: root/net/bind99
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2012-05-01 02:47:52 +0000
committertaca <taca@pkgsrc.org>2012-05-01 02:47:52 +0000
commit46c787c34620caa1512679581ef172cd83540152 (patch)
treec6fd19847043a3af6f66b01367906f744b781e65 /net/bind99
parent1bcba581666203b69b0a2cf537155068fb0cf4bb (diff)
downloadpkgsrc-46c787c34620caa1512679581ef172cd83540152.tar.gz
Add fix to a race condition in the resolver code that can cause a recursive
nameserver: <https://kb.isc.org/article/AA-00664>. Bump PKGREVISION.
Diffstat (limited to 'net/bind99')
-rw-r--r--net/bind99/Makefile3
-rw-r--r--net/bind99/distinfo3
-rw-r--r--net/bind99/patches/patch-lib_dns_resolver.c34
3 files changed, 38 insertions, 2 deletions
diff --git a/net/bind99/Makefile b/net/bind99/Makefile
index 823603e9eda..269ed0702df 100644
--- a/net/bind99/Makefile
+++ b/net/bind99/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1.1.1 2012/03/07 14:25:00 taca Exp $
+# $NetBSD: Makefile,v 1.2 2012/05/01 02:47:52 taca Exp $
DISTNAME= bind-${BIND_VERSION}
PKGNAME= ${DISTNAME:S/-P/pl/}
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ftp://ftp.isc.org/isc/bind9/${BIND_VERSION}/ \
http://ftp.belnet.be/pub/mirror/ftp.isc.org/isc/bind9/${BIND_VERSION}/
diff --git a/net/bind99/distinfo b/net/bind99/distinfo
index 74d909b55b6..6a3c9f1591f 100644
--- a/net/bind99/distinfo
+++ b/net/bind99/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2012/03/23 21:25:01 marino Exp $
+$NetBSD: distinfo,v 1.3 2012/05/01 02:47:52 taca Exp $
SHA1 (bind-9.9.0.tar.gz) = 6be77c75c8649088b0ae7124d819b5f412bb0094
RMD160 (bind-9.9.0.tar.gz) = 5fda36a3aa84062f7936978cb540e8ad3f1c4e08
@@ -10,6 +10,7 @@ SHA1 (patch-configure) = 6a8b709d8369864c397d4315348c9c96753618f6
SHA1 (patch-lib_bind9_Makefile.in) = 89e21d21fa512f11a2fdb8d7455abd5d95f20ba5
SHA1 (patch-lib_dns_Makefile.in) = 1770a8bd86901c618b11d255f3af54748d04b759
SHA1 (patch-lib_dns_rbt.c) = df4b029369d9fa3b250d8505b5f7590e2cd86654
+SHA1 (patch-lib_dns_resolver.c) = 48f17278af67ea8f5a282b1194281c36959a046e
SHA1 (patch-lib_dns_zone.c) = e01378ee95bf7c5b903a2c3a90acf83a3a4cae52
SHA1 (patch-lib_isc_Makefile.in) = 5e0739d19957b1f26bcc24a6c76bcab6248cbff5
SHA1 (patch-lib_isccc_Makefile.in) = a31831872b7724cb84f663ed70a82335d812f95f
diff --git a/net/bind99/patches/patch-lib_dns_resolver.c b/net/bind99/patches/patch-lib_dns_resolver.c
new file mode 100644
index 00000000000..e0ecab901a4
--- /dev/null
+++ b/net/bind99/patches/patch-lib_dns_resolver.c
@@ -0,0 +1,34 @@
+$NetBSD: patch-lib_dns_resolver.c,v 1.1 2012/05/01 02:47:52 taca Exp $
+
+Prevent segmentation fault in resolver.c: https://kb.isc.org/article/AA-00664
+
+--- lib/dns/resolver.c.orig 2012-02-14 23:46:49.000000000 +0000
++++ lib/dns/resolver.c
+@@ -2166,7 +2166,6 @@ fctx_finddone(isc_task_t *task, isc_even
+ isc_boolean_t want_try = ISC_FALSE;
+ isc_boolean_t want_done = ISC_FALSE;
+ isc_boolean_t bucket_empty = ISC_FALSE;
+- isc_boolean_t destroy = ISC_FALSE;
+ unsigned int bucketnum;
+
+ find = event->ev_sender;
+@@ -2205,17 +2204,12 @@ fctx_finddone(isc_task_t *task, isc_even
+ }
+ } else if (SHUTTINGDOWN(fctx) && fctx->pending == 0 &&
+ fctx->nqueries == 0 && ISC_LIST_EMPTY(fctx->validators)) {
+- /*
+- * Note that we had to wait until we had the lock before
+- * looking at fctx->references.
+- */
++
+ if (fctx->references == 0)
+- destroy = ISC_TRUE;
++ bucket_empty = fctx_destroy(fctx);
+ }
+ UNLOCK(&res->buckets[bucketnum].lock);
+
+- if (destroy)
+- bucket_empty = fctx_destroy(fctx);
+ isc_event_free(&event);
+ dns_adb_destroyfind(&find);
+