summaryrefslogtreecommitdiff
path: root/dns
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2009-11-07 19:23:17 +0000
committerDoug Barton <dougb@FreeBSD.org>2009-11-07 19:23:17 +0000
commit02cadbab0bf0b1887efa1c621d10b3fba39f62a2 (patch)
tree266cb43ec0d2b25bf5cfd057b906b13f42d9a78c /dns
parentApache's status module is an easy way to get information about what (diff)
Wrap some query socket handling in dig with a socket != NULL bow
This patch or something similar will likely be included in a future BIND release. PR: bin/138061 Submitted by: Michael Baker <michael.baker@diversit.com.au> Original patch submitted by: Volker <volker@vwsoft.com> Patch reviewed and tweaked by: ISC
Notes
Notes: svn path=/head/; revision=243943
Diffstat (limited to 'dns')
-rw-r--r--dns/bind94/Makefile1
-rw-r--r--dns/bind94/files/patch-bin_dig_dighost.c19
-rw-r--r--dns/bind95/Makefile1
-rw-r--r--dns/bind95/files/patch-bin_dig_dighost.c19
-rw-r--r--dns/bind96/Makefile1
-rw-r--r--dns/bind96/files/patch-bin_dig_dighost.c19
6 files changed, 60 insertions, 0 deletions
diff --git a/dns/bind94/Makefile b/dns/bind94/Makefile
index d2c67ad3cf06..8f2c598a0898 100644
--- a/dns/bind94/Makefile
+++ b/dns/bind94/Makefile
@@ -13,6 +13,7 @@
PORTNAME= bind94
PORTVERSION= 9.4.3.3
+PORTREVISION= 1
CATEGORIES= dns net ipv6
MASTER_SITES= ${MASTER_SITE_ISC} \
http://dougbarton.us/Downloads/%SUBDIR%/
diff --git a/dns/bind94/files/patch-bin_dig_dighost.c b/dns/bind94/files/patch-bin_dig_dighost.c
new file mode 100644
index 000000000000..4777cf35d6ac
--- /dev/null
+++ b/dns/bind94/files/patch-bin_dig_dighost.c
@@ -0,0 +1,19 @@
+--- bin/dig/dighost.c.orig 2008-07-23 16:33:02.000000000 -0700
++++ bin/dig/dighost.c 2009-11-07 11:14:27.000000000 -0800
+@@ -2539,10 +2539,12 @@
+
+ if (sevent->result == ISC_R_CANCELED) {
+ debug("in cancel handler");
+- isc_socket_detach(&query->sock);
+- sockcount--;
+- INSIST(sockcount >= 0);
+- debug("sockcount=%d", sockcount);
++ if (query->sock != NULL) {
++ isc_socket_detach(&query->sock);
++ sockcount--;
++ INSIST(sockcount >= 0);
++ debug("sockcount=%d", sockcount);
++ }
+ query->waiting_connect = ISC_FALSE;
+ isc_event_free(&event);
+ l = query->lookup;
diff --git a/dns/bind95/Makefile b/dns/bind95/Makefile
index 52eaa1188c7e..0bf348bd6d95 100644
--- a/dns/bind95/Makefile
+++ b/dns/bind95/Makefile
@@ -13,6 +13,7 @@
PORTNAME= bind95
PORTVERSION= 9.5.2
+PORTREVISION= 1
CATEGORIES= dns net ipv6
MASTER_SITES= ${MASTER_SITE_ISC} \
http://dougbarton.us/Downloads/%SUBDIR%/
diff --git a/dns/bind95/files/patch-bin_dig_dighost.c b/dns/bind95/files/patch-bin_dig_dighost.c
new file mode 100644
index 000000000000..91e0706a1f8e
--- /dev/null
+++ b/dns/bind95/files/patch-bin_dig_dighost.c
@@ -0,0 +1,19 @@
+--- bin/dig/dighost.c.orig 2009-06-23 20:42:32.000000000 -0700
++++ bin/dig/dighost.c 2009-11-07 11:10:12.000000000 -0800
+@@ -2606,10 +2606,12 @@
+
+ if (sevent->result == ISC_R_CANCELED) {
+ debug("in cancel handler");
+- isc_socket_detach(&query->sock);
+- sockcount--;
+- INSIST(sockcount >= 0);
+- debug("sockcount=%d", sockcount);
++ if (query->sock != NULL) {
++ isc_socket_detach(&query->sock);
++ sockcount--;
++ INSIST(sockcount >= 0);
++ debug("sockcount=%d", sockcount);
++ }
+ query->waiting_connect = ISC_FALSE;
+ isc_event_free(&event);
+ l = query->lookup;
diff --git a/dns/bind96/Makefile b/dns/bind96/Makefile
index 821e067f86e7..34282cab6415 100644
--- a/dns/bind96/Makefile
+++ b/dns/bind96/Makefile
@@ -13,6 +13,7 @@
PORTNAME= bind96
PORTVERSION= 9.6.1.1
+PORTREVISION= 1
CATEGORIES= dns net ipv6
MASTER_SITES= ${MASTER_SITE_ISC} \
http://dougbarton.us/Downloads/%SUBDIR%/
diff --git a/dns/bind96/files/patch-bin_dig_dighost.c b/dns/bind96/files/patch-bin_dig_dighost.c
new file mode 100644
index 000000000000..19cbde833cfc
--- /dev/null
+++ b/dns/bind96/files/patch-bin_dig_dighost.c
@@ -0,0 +1,19 @@
+--- bin/dig/dighost.c.orig 2009-02-24 18:39:21.000000000 -0800
++++ bin/dig/dighost.c 2009-11-07 11:03:16.000000000 -0800
+@@ -2604,10 +2604,12 @@
+
+ if (sevent->result == ISC_R_CANCELED) {
+ debug("in cancel handler");
+- isc_socket_detach(&query->sock);
+- sockcount--;
+- INSIST(sockcount >= 0);
+- debug("sockcount=%d", sockcount);
++ if (query->sock != NULL) {
++ isc_socket_detach(&query->sock);
++ sockcount--;
++ INSIST(sockcount >= 0);
++ debug("sockcount=%d", sockcount);
++ }
+ query->waiting_connect = ISC_FALSE;
+ isc_event_free(&event);
+ l = query->lookup;