summaryrefslogtreecommitdiffstats
path: root/bin/named
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2011-02-05 03:14:55 +0000
committerdougb <dougb@FreeBSD.org>2011-02-05 03:14:55 +0000
commit8287cb3f73a2d36684fdf69f4009f28e17dd3800 (patch)
tree601b0776df11a070020ab894b76fd90e36393936 /bin/named
parentd2262df647cb68b7a55a79623696e646c546774e (diff)
downloadFreeBSD-src-8287cb3f73a2d36684fdf69f4009f28e17dd3800.zip
FreeBSD-src-8287cb3f73a2d36684fdf69f4009f28e17dd3800.tar.gz
Vendor import of BIND 9.6.3
Diffstat (limited to 'bin/named')
-rw-r--r--bin/named/builtin.c11
-rw-r--r--bin/named/client.c2
-rw-r--r--bin/named/control.c9
-rw-r--r--bin/named/include/named/globals.h3
-rw-r--r--bin/named/include/named/query.h2
-rw-r--r--bin/named/main.c4
-rw-r--r--bin/named/query.c36
-rw-r--r--bin/named/server.c19
-rw-r--r--bin/named/update.c5
-rw-r--r--bin/named/xfrout.c22
10 files changed, 72 insertions, 41 deletions
diff --git a/bin/named/builtin.c b/bin/named/builtin.c
index 7927737..60cb634 100644
--- a/bin/named/builtin.c
+++ b/bin/named/builtin.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2010 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001-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: builtin.c,v 1.12 2007/06/19 23:46:59 tbox Exp $ */
+/* $Id: builtin.c,v 1.12.334.3 2010-08-03 23:45:47 tbox Exp $ */
/*! \file
* \brief
@@ -95,7 +95,7 @@ put_txt(dns_sdblookup_t *lookup, const char *text) {
static isc_result_t
do_version_lookup(dns_sdblookup_t *lookup) {
- if (ns_g_server->version_set) {
+ if (ns_g_server->version_set) {
if (ns_g_server->version == NULL)
return (ISC_R_SUCCESS);
else
@@ -132,6 +132,7 @@ do_authors_lookup(dns_sdblookup_t *lookup) {
"Michael Graff",
"Andreas Gustafsson",
"Bob Halley",
+ "JINMEI Tatuya",
"David Lawrence",
"Danny Mayer",
"Damien Neil",
@@ -198,7 +199,7 @@ builtin_authority(const char *zone, void *dbdata, dns_sdblookup_t *lookup) {
if (b->contact != NULL)
contact = b->contact;
}
-
+
result = dns_sdb_putsoa(lookup, server, contact, 0);
if (result != ISC_R_SUCCESS)
return (ISC_R_FAILURE);
@@ -233,7 +234,7 @@ builtin_create(const char *zone, int argc, char **argv,
*dbdata = &authors_builtin;
else if (strcmp(argv[0], "id") == 0)
*dbdata = &id_builtin;
- else if (strcmp(argv[0], "empty") == 0) {
+ else if (strcmp(argv[0], "empty") == 0) {
builtin_t *empty;
char *server;
char *contact;
diff --git a/bin/named/client.c b/bin/named/client.c
index a0e034a..6236d27 100644
--- a/bin/named/client.c
+++ b/bin/named/client.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: client.c,v 1.259.12.3.24.2 2010/09/29 23:46:31 tbox Exp $ */
+/* $Id: client.c,v 1.259.12.5 2010-09-24 08:30:27 tbox Exp $ */
#include <config.h>
diff --git a/bin/named/control.c b/bin/named/control.c
index ac1ec42..38115d6 100644
--- a/bin/named/control.c
+++ b/bin/named/control.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009, 2010 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001-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: control.c,v 1.33.266.2 2009/07/11 23:47:17 tbox Exp $ */
+/* $Id: control.c,v 1.33.266.4 2010-12-03 23:45:46 tbox Exp $ */
/*! \file */
@@ -129,11 +129,16 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) {
* isc_app_shutdown below.
*/
#endif
+ /* Do not flush master files */
ns_server_flushonshutdown(ns_g_server, ISC_FALSE);
ns_os_shutdownmsg(command, text);
isc_app_shutdown();
result = ISC_R_SUCCESS;
} else if (command_compare(command, NS_COMMAND_STOP)) {
+ /*
+ * "stop" is the same as "halt" except it does
+ * flush master files.
+ */
#ifdef HAVE_LIBSCF
if (ns_smf_got_instance == 1 && ns_smf_chroot == 1) {
result = ns_smf_add_message(text);
diff --git a/bin/named/include/named/globals.h b/bin/named/include/named/globals.h
index c39fe5e..1d57a18 100644
--- a/bin/named/include/named/globals.h
+++ b/bin/named/include/named/globals.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: globals.h,v 1.80.84.2 2010/06/26 23:46:15 tbox Exp $ */
+/* $Id: globals.h,v 1.80.12.3 2010-09-15 12:16:50 marka Exp $ */
#ifndef NAMED_GLOBALS_H
#define NAMED_GLOBALS_H 1
@@ -133,6 +133,7 @@ EXTERN isc_time_t ns_g_boottime;
EXTERN isc_boolean_t ns_g_memstatistics INIT(ISC_FALSE);
EXTERN isc_boolean_t ns_g_clienttest INIT(ISC_FALSE);
EXTERN isc_boolean_t ns_g_nosoa INIT(ISC_FALSE);
+EXTERN isc_boolean_t ns_g_noaa INIT(ISC_FALSE);
#undef EXTERN
#undef INIT
diff --git a/bin/named/include/named/query.h b/bin/named/include/named/query.h
index 3f019a3..2f00f1e 100644
--- a/bin/named/include/named/query.h
+++ b/bin/named/include/named/query.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: query.h,v 1.40.626.2 2010/09/29 23:46:31 tbox Exp $ */
+/* $Id: query.h,v 1.40.332.2 2010-09-24 08:30:28 tbox Exp $ */
#ifndef NAMED_QUERY_H
#define NAMED_QUERY_H 1
diff --git a/bin/named/main.c b/bin/named/main.c
index 74bace5..a1d94ff 100644
--- a/bin/named/main.c
+++ b/bin/named/main.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: main.c,v 1.166.34.3.24.3 2010/09/06 03:58:32 marka Exp $ */
+/* $Id: main.c,v 1.166.34.7 2010-09-15 12:16:49 marka Exp $ */
/*! \file */
@@ -455,6 +455,8 @@ parse_command_line(int argc, char *argv[]) {
ns_g_clienttest = ISC_TRUE;
else if (!strcmp(isc_commandline_argument, "nosoa"))
ns_g_nosoa = ISC_TRUE;
+ else if (!strcmp(isc_commandline_argument, "noaa"))
+ ns_g_noaa = ISC_TRUE;
else
fprintf(stderr, "unknown -T flag '%s\n",
isc_commandline_argument);
diff --git a/bin/named/query.c b/bin/named/query.c
index 0ba708b..fa34da6 100644
--- a/bin/named/query.c
+++ b/bin/named/query.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: query.c,v 1.313.20.16.10.3 2010/09/29 00:03:32 marka Exp $ */
+/* $Id: query.c,v 1.313.20.24 2010-09-24 08:09:07 marka Exp $ */
/*! \file */
@@ -2796,7 +2796,7 @@ query_addds(ns_client_t *client, dns_db_t *db, dns_dbnode_t *node,
static void
query_addwildcardproof(ns_client_t *client, dns_db_t *db,
dns_dbversion_t *version, dns_name_t *name,
- isc_boolean_t ispositive)
+ isc_boolean_t ispositive, isc_boolean_t nodata)
{
isc_buffer_t *dbuf, b;
dns_name_t *fname;
@@ -2984,7 +2984,7 @@ query_addwildcardproof(ns_client_t *client, dns_db_t *db,
goto cleanup;
query_findclosestnsec3(wname, db, NULL, client, rdataset,
- sigrdataset, fname, ISC_FALSE, NULL);
+ sigrdataset, fname, nodata, NULL);
if (!dns_rdataset_isassociated(rdataset))
goto cleanup;
query_addrrset(client, &fname, &rdataset, &sigrdataset,
@@ -3087,7 +3087,7 @@ query_addnxrrsetnsec(ns_client_t *client, dns_db_t *db,
/* XXX */
query_addwildcardproof(client, db, version, client->query.qname,
- ISC_TRUE);
+ ISC_TRUE, ISC_FALSE);
/*
* We'll need some resources...
@@ -4307,7 +4307,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
query_releasename(client, &fname);
query_addwildcardproof(client, db, version,
client->query.qname,
- ISC_FALSE);
+ ISC_FALSE, ISC_TRUE);
}
}
if (dns_rdataset_isassociated(rdataset)) {
@@ -4396,7 +4396,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
&sigrdataset,
NULL, DNS_SECTION_AUTHORITY);
query_addwildcardproof(client, db, version,
- client->query.qname, ISC_FALSE);
+ client->query.qname, ISC_FALSE,
+ ISC_FALSE);
}
/*
@@ -4715,7 +4716,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
/*
* We didn't match any rdatasets.
*/
- if (qtype == dns_rdatatype_rrsig &&
+ if ((qtype == dns_rdatatype_rrsig ||
+ qtype == dns_rdatatype_sig) &&
result == ISC_R_NOMORE) {
/*
* XXXRTH If this is a secure zone and we
@@ -4724,6 +4726,18 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
* glue. Ugh.
*/
if (!is_zone) {
+ /*
+ * Note: this is dead code because
+ * is_zone is always true due to the
+ * condition above. But naive
+ * recursion would cause infinite
+ * attempts of recursion because
+ * the answer to (RR)SIG queries
+ * won't be cached. Until we figure
+ * out what we should do and implement
+ * it we intentionally keep this code
+ * dead.
+ */
authoritative = ISC_FALSE;
dns_rdatasetiter_destroy(&rdsiter);
if (RECURSIONOK(client)) {
@@ -4822,7 +4836,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
if (need_wildcardproof && dns_db_issecure(db))
query_addwildcardproof(client, db, version,
dns_fixedname_name(&wildcardname),
- ISC_TRUE);
+ ISC_TRUE, ISC_FALSE);
cleanup:
CTRACE("query_find: cleanup");
/*
@@ -5189,8 +5203,12 @@ ns_query_start(ns_client_t *client) {
/*
* Assume authoritative response until it is known to be
* otherwise.
+ *
+ * If "-T noaa" has been set on the command line don't set
+ * AA on authoritative answers.
*/
- message->flags |= DNS_MESSAGEFLAG_AA;
+ if (!ns_g_noaa)
+ message->flags |= DNS_MESSAGEFLAG_AA;
/*
* Set AD. We must clear it if we add non-validated data to a
diff --git a/bin/named/server.c b/bin/named/server.c
index 5fbe043..bc7fc17 100644
--- a/bin/named/server.c
+++ b/bin/named/server.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2011 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: server.c,v 1.520.12.11.10.4 2010/11/16 22:42:03 marka Exp $ */
+/* $Id: server.c,v 1.520.12.21 2011-01-14 23:45:49 tbox Exp $ */
/*! \file */
@@ -205,11 +205,13 @@ static const struct {
{ "168.192.IN-ADDR.ARPA", ISC_TRUE },
#endif
- /* RFC 3330 */
+ /* RFC 5735 and RFC 5737 */
{ "0.IN-ADDR.ARPA", ISC_FALSE }, /* THIS NETWORK */
{ "127.IN-ADDR.ARPA", ISC_FALSE }, /* LOOPBACK */
{ "254.169.IN-ADDR.ARPA", ISC_FALSE }, /* LINK LOCAL */
{ "2.0.192.IN-ADDR.ARPA", ISC_FALSE }, /* TEST NET */
+ { "100.51.198.IN-ADDR.ARPA", ISC_FALSE }, /* TEST NET 2 */
+ { "113.0.203.IN-ADDR.ARPA", ISC_FALSE }, /* TEST NET 3 */
{ "255.255.255.255.IN-ADDR.ARPA", ISC_FALSE }, /* BROADCAST */
/* Local IPv6 Unicast Addresses */
@@ -222,6 +224,9 @@ static const struct {
{ "A.E.F.IP6.ARPA", ISC_FALSE }, /* LINK LOCAL */
{ "B.E.F.IP6.ARPA", ISC_FALSE }, /* LINK LOCAL */
+ /* Example Prefix, RFC 3849. */
+ { "8.B.D.0.1.0.0.2.IP6.ARPA", ISC_FALSE },
+
{ NULL, ISC_FALSE }
};
@@ -5277,10 +5282,8 @@ ns_server_tsigdelete(ns_server_t *server, char *command, isc_buffer_t *text) {
n = snprintf((char *)isc_buffer_used(text),
isc_buffer_availablelength(text),
"%d tsig keys deleted.\n", foundkeys);
- if (n >= isc_buffer_availablelength(text)) {
- isc_task_endexclusive(server->task);
+ if (n >= isc_buffer_availablelength(text))
return (ISC_R_NOSPACE);
- }
isc_buffer_add(text, n);
return (ISC_R_SUCCESS);
@@ -5396,10 +5399,8 @@ ns_server_tsiglist(ns_server_t *server, isc_buffer_t *text) {
n = snprintf((char *)isc_buffer_used(text),
isc_buffer_availablelength(text),
"no tsig keys found.\n");
- if (n >= isc_buffer_availablelength(text)) {
- isc_task_endexclusive(server->task);
+ if (n >= isc_buffer_availablelength(text))
return (ISC_R_NOSPACE);
- }
isc_buffer_add(text, n);
}
diff --git a/bin/named/update.c b/bin/named/update.c
index 74a192a..1504a44 100644
--- a/bin/named/update.c
+++ b/bin/named/update.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2010 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: update.c,v 1.151.12.9 2009/12/30 04:02:56 marka Exp $ */
+/* $Id: update.c,v 1.151.12.11 2010-02-26 23:48:43 tbox Exp $ */
#include <config.h>
@@ -1945,6 +1945,7 @@ add_sigs(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
CHECK(update_one_rr(db, ver, diff, DNS_DIFFOP_ADDRESIGN, name,
rdataset.ttl, &sig_rdata));
dns_rdata_reset(&sig_rdata);
+ isc_buffer_init(&buffer, data, sizeof(data));
added_sig = ISC_TRUE;
}
if (!added_sig) {
diff --git a/bin/named/xfrout.c b/bin/named/xfrout.c
index 0aa6f79..e61dc72 100644
--- a/bin/named/xfrout.c
+++ b/bin/named/xfrout.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2010 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: xfrout.c,v 1.131.26.4 2009/01/29 22:40:34 jinmei Exp $ */
+/* $Id: xfrout.c,v 1.131.26.6 2010-05-27 23:48:18 tbox Exp $ */
#include <config.h>
@@ -985,11 +985,13 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
#ifdef DLZ
{
/*
- * Normal zone table does not have a match. Try the DLZ database
+ * Normal zone table does not have a match.
+ * Try the DLZ database
*/
if (client->view->dlzdatabase != NULL) {
result = dns_dlzallowzonexfr(client->view,
- question_name, &client->peeraddr,
+ question_name,
+ &client->peeraddr,
&db);
if (result == ISC_R_NOPERM) {
@@ -1228,9 +1230,9 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
#ifdef DLZ
if (is_dlz)
- CHECK(xfrout_ctx_create(mctx, client, request->id, question_name,
- reqtype, question_class, zone, db, ver,
- quota, stream,
+ CHECK(xfrout_ctx_create(mctx, client, request->id,
+ question_name, reqtype, question_class,
+ zone, db, ver, quota, stream,
dns_message_gettsigkey(request),
tsigbuf,
3600,
@@ -1240,9 +1242,9 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
&xfr));
else
#endif
- CHECK(xfrout_ctx_create(mctx, client, request->id, question_name,
- reqtype, question_class, zone, db, ver,
- quota, stream,
+ CHECK(xfrout_ctx_create(mctx, client, request->id,
+ question_name, reqtype, question_class,
+ zone, db, ver, quota, stream,
dns_message_gettsigkey(request),
tsigbuf,
dns_zone_getmaxxfrout(zone),
OpenPOWER on IntegriCloud