aboutsummaryrefslogtreecommitdiff
path: root/contrib/bind9/bin/named/client.c
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2012-04-05 04:29:35 +0000
committerDoug Barton <dougb@FreeBSD.org>2012-04-05 04:29:35 +0000
commitd0f6280db790de2ad69bd01a1275e350cbd2840d (patch)
treecf3176c0801c94a4f298353cc450f10cf1aae9c0 /contrib/bind9/bin/named/client.c
parent8931e524bfb5c6a10894f704e3eaa05ee5d9fa77 (diff)
parent42d3eba523963ab015ac451eeea0788b11631c94 (diff)
Update to version 9.8.2, the latest from ISC, which contains numerous bug fixes.
Notes
Notes: svn path=/head/; revision=233914
Diffstat (limited to 'contrib/bind9/bin/named/client.c')
-rw-r--r--contrib/bind9/bin/named/client.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/contrib/bind9/bin/named/client.c b/contrib/bind9/bin/named/client.c
index 2115ac101bcf..606cc2d4dad4 100644
--- a/contrib/bind9/bin/named/client.c
+++ b/contrib/bind9/bin/named/client.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: client.c,v 1.271.10.2 2011-07-28 04:30:54 marka Exp $ */
+/* $Id: client.c,v 1.271.10.4 2012/01/31 23:46:39 tbox Exp $ */
#include <config.h>
@@ -934,6 +934,15 @@ ns_client_send(ns_client_t *client) {
render_opts = 0;
else
render_opts = DNS_MESSAGERENDER_OMITDNSSEC;
+
+ preferred_glue = 0;
+ if (client->view != NULL) {
+ if (client->view->preferred_glue == dns_rdatatype_a)
+ preferred_glue = DNS_MESSAGERENDER_PREFER_A;
+ else if (client->view->preferred_glue == dns_rdatatype_aaaa)
+ preferred_glue = DNS_MESSAGERENDER_PREFER_AAAA;
+ }
+
#ifdef ALLOW_FILTER_AAAA_ON_V4
/*
* filter-aaaa-on-v4 yes or break-dnssec option to suppress
@@ -942,17 +951,15 @@ ns_client_send(ns_client_t *client) {
* that we have both AAAA and A records,
* and that we either have no signatures that the client wants
* or we are supposed to break DNSSEC.
+ *
+ * Override preferred glue if necessary.
*/
- if ((client->attributes & NS_CLIENTATTR_FILTER_AAAA) != 0)
+ if ((client->attributes & NS_CLIENTATTR_FILTER_AAAA) != 0) {
render_opts |= DNS_MESSAGERENDER_FILTER_AAAA;
-#endif
- preferred_glue = 0;
- if (client->view != NULL) {
- if (client->view->preferred_glue == dns_rdatatype_a)
+ if (preferred_glue == DNS_MESSAGERENDER_PREFER_AAAA)
preferred_glue = DNS_MESSAGERENDER_PREFER_A;
- else if (client->view->preferred_glue == dns_rdatatype_aaaa)
- preferred_glue = DNS_MESSAGERENDER_PREFER_AAAA;
}
+#endif
/*
* XXXRTH The following doesn't deal with TCP buffer resizing.
@@ -2109,6 +2116,9 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
client->recursionquota = NULL;
client->interface = NULL;
client->peeraddr_valid = ISC_FALSE;
+#ifdef ALLOW_FILTER_AAAA_ON_V4
+ client->filter_aaaa = dns_v4_aaaa_ok;
+#endif
ISC_EVENT_INIT(&client->ctlevent, sizeof(client->ctlevent), 0, NULL,
NS_EVENT_CLIENTCONTROL, client_start, client, client,
NULL, NULL);