diff options
| author | Doug Barton <dougb@FreeBSD.org> | 2010-10-31 04:45:53 +0000 |
|---|---|---|
| committer | Doug Barton <dougb@FreeBSD.org> | 2010-10-31 04:45:53 +0000 |
| commit | 34ceb982dc5764b63f6478db13396f87a0413247 (patch) | |
| tree | dc8e6851bb25a91d6e868289ab8bf5348f33a546 /contrib/bind9/bin/named | |
| parent | 031f70f09fe6ab44525dc332810447918f9e7029 (diff) | |
| parent | 0f0e363281d939478823f6d05bcab56d901ead06 (diff) | |
Notes
Diffstat (limited to 'contrib/bind9/bin/named')
| -rw-r--r-- | contrib/bind9/bin/named/include/named/globals.h | 5 | ||||
| -rw-r--r-- | contrib/bind9/bin/named/main.c | 8 | ||||
| -rw-r--r-- | contrib/bind9/bin/named/query.c | 24 | ||||
| -rw-r--r-- | contrib/bind9/bin/named/server.c | 2 |
4 files changed, 26 insertions, 13 deletions
diff --git a/contrib/bind9/bin/named/include/named/globals.h b/contrib/bind9/bin/named/include/named/globals.h index 6040dc30eb07..c39fe5ec3d72 100644 --- a/contrib/bind9/bin/named/include/named/globals.h +++ b/contrib/bind9/bin/named/include/named/globals.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008, 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: globals.h,v 1.80 2008/11/16 22:49:18 marka Exp $ */ +/* $Id: globals.h,v 1.80.84.2 2010/06/26 23:46:15 tbox Exp $ */ #ifndef NAMED_GLOBALS_H #define NAMED_GLOBALS_H 1 @@ -132,6 +132,7 @@ EXTERN int ns_g_listen INIT(3); 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); #undef EXTERN #undef INIT diff --git a/contrib/bind9/bin/named/main.c b/contrib/bind9/bin/named/main.c index f97ab45a317c..74bace50065a 100644 --- a/contrib/bind9/bin/named/main.c +++ b/contrib/bind9/bin/named/main.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: main.c,v 1.166.34.3 2009/04/03 20:18:59 marka Exp $ */ +/* $Id: main.c,v 1.166.34.3.24.3 2010/09/06 03:58:32 marka Exp $ */ /*! \file */ @@ -446,13 +446,15 @@ parse_command_line(int argc, char *argv[]) { /* XXXJAB should we make a copy? */ ns_g_chrootdir = isc_commandline_argument; break; - case 'T': + case 'T': /* NOT DOCUMENTED */ /* * clienttest: make clients single shot with their * own memory context. */ if (strcmp(isc_commandline_argument, "clienttest") == 0) ns_g_clienttest = ISC_TRUE; + else if (!strcmp(isc_commandline_argument, "nosoa")) + ns_g_nosoa = ISC_TRUE; else fprintf(stderr, "unknown -T flag '%s\n", isc_commandline_argument); diff --git a/contrib/bind9/bin/named/query.c b/contrib/bind9/bin/named/query.c index cef6d7f7c3a8..73ed1a6b9095 100644 --- a/contrib/bind9/bin/named/query.c +++ b/contrib/bind9/bin/named/query.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: query.c,v 1.313.20.16 2009/12/30 08:34:29 jinmei Exp $ */ +/* $Id: query.c,v 1.313.20.16.10.2 2010/06/26 23:46:14 tbox Exp $ */ /*! \file */ @@ -56,6 +56,7 @@ #include <dns/zt.h> #include <named/client.h> +#include <named/globals.h> #include <named/log.h> #include <named/server.h> #include <named/sortlist.h> @@ -2038,7 +2039,7 @@ query_addrrset(ns_client_t *client, dns_name_t **namep, static inline isc_result_t query_addsoa(ns_client_t *client, dns_db_t *db, dns_dbversion_t *version, - isc_boolean_t zero_ttl) + isc_boolean_t zero_ttl, isc_boolean_t isassociated) { dns_name_t *name; dns_dbnode_t *node; @@ -2056,6 +2057,12 @@ query_addsoa(ns_client_t *client, dns_db_t *db, dns_dbversion_t *version, node = NULL; /* + * Don't add the SOA record for test which set "-T nosoa". + */ + if (ns_g_nosoa && (!WANTDNSSEC(client) || !isassociated)) + return (ISC_R_SUCCESS); + + /* * Get resources and make 'name' be the database origin. */ result = dns_message_gettempname(client->message, &name); @@ -4324,7 +4331,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype) /* * Add SOA. */ - result = query_addsoa(client, db, version, ISC_FALSE); + result = query_addsoa(client, db, version, ISC_FALSE, + dns_rdataset_isassociated(rdataset)); if (result != ISC_R_SUCCESS) { QUERY_ERROR(result); goto cleanup; @@ -4372,9 +4380,11 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype) zone != NULL && #endif dns_zone_getzeronosoattl(zone)) - result = query_addsoa(client, db, version, ISC_TRUE); + result = query_addsoa(client, db, version, ISC_TRUE, + dns_rdataset_isassociated(rdataset)); else - result = query_addsoa(client, db, version, ISC_FALSE); + result = query_addsoa(client, db, version, ISC_FALSE, + dns_rdataset_isassociated(rdataset)); if (result != ISC_R_SUCCESS) { QUERY_ERROR(result); goto cleanup; @@ -4742,7 +4752,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype) * Add SOA. */ result = query_addsoa(client, db, version, - ISC_FALSE); + ISC_FALSE, ISC_FALSE); if (result == ISC_R_SUCCESS) result = ISC_R_NOMORE; } else { diff --git a/contrib/bind9/bin/named/server.c b/contrib/bind9/bin/named/server.c index 6608fdfe1409..8f6778666a07 100644 --- a/contrib/bind9/bin/named/server.c +++ b/contrib/bind9/bin/named/server.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.520.12.11.8.2 2010/02/25 10:57:11 tbox Exp $ */ +/* $Id: server.c,v 1.520.12.11.10.1 2010/03/03 22:06:36 marka Exp $ */ /*! \file */ |
