Module Name:    src
Committed By:   spz
Date:           Tue Jul  5 21:59:19 UTC 2011

Modified Files:
        src/external/bsd/bind/dist/bin/dnssec: dnssec-keyfromlabel.8
        src/external/bsd/bind/dist/bin/named: bind9.xsl.h config.c query.c
            update.c
        src/external/bsd/bind/dist/bin/rndc: rndc.c
        src/external/bsd/bind/dist/bin/tests/resolver: t_resolver.c
        src/external/bsd/bind/dist/lib/dns: dispatch.c masterdump.c message.c
            ncache.c nsec3.c rbtdb.c rdataset.c rdataslab.c resolver.c
            validator.c xfrin.c
        src/external/bsd/bind/dist/lib/dns/include/dns: masterdump.h rdataset.h
            resolver.h
        src/external/bsd/bind/dist/lib/isc: task.c timer.c
        src/external/bsd/bind/dist/lib/isc/include/isc: task.h
        src/external/bsd/bind/dist/lib/isc/unix: socket.c
        src/external/bsd/bind/dist/lib/isc/win32/include/isc: ipv6.h

Log Message:
merge import of bind-9.8.0-P4


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
    src/external/bsd/bind/dist/bin/dnssec/dnssec-keyfromlabel.8
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/bind/dist/bin/named/bind9.xsl.h \
    src/external/bsd/bind/dist/bin/named/config.c \
    src/external/bsd/bind/dist/bin/named/update.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/bind/dist/bin/named/query.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/bind/dist/bin/rndc/rndc.c
cvs rdiff -u -r1.2 -r1.3 \
    src/external/bsd/bind/dist/bin/tests/resolver/t_resolver.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/bind/dist/lib/dns/dispatch.c \
    src/external/bsd/bind/dist/lib/dns/masterdump.c \
    src/external/bsd/bind/dist/lib/dns/nsec3.c \
    src/external/bsd/bind/dist/lib/dns/rdataset.c \
    src/external/bsd/bind/dist/lib/dns/rdataslab.c
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/bind/dist/lib/dns/message.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/bind/dist/lib/dns/ncache.c \
    src/external/bsd/bind/dist/lib/dns/xfrin.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/bind/dist/lib/dns/rbtdb.c
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/bind/dist/lib/dns/resolver.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/bind/dist/lib/dns/validator.c
cvs rdiff -u -r1.2 -r1.3 \
    src/external/bsd/bind/dist/lib/dns/include/dns/masterdump.h \
    src/external/bsd/bind/dist/lib/dns/include/dns/rdataset.h \
    src/external/bsd/bind/dist/lib/dns/include/dns/resolver.h
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/bind/dist/lib/isc/task.c \
    src/external/bsd/bind/dist/lib/isc/timer.c
cvs rdiff -u -r1.2 -r1.3 \
    src/external/bsd/bind/dist/lib/isc/include/isc/task.h
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/bind/dist/lib/isc/unix/socket.c
cvs rdiff -u -r1.2 -r1.3 \
    src/external/bsd/bind/dist/lib/isc/win32/include/isc/ipv6.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/bind/dist/bin/dnssec/dnssec-keyfromlabel.8
diff -u src/external/bsd/bind/dist/bin/dnssec/dnssec-keyfromlabel.8:1.2 src/external/bsd/bind/dist/bin/dnssec/dnssec-keyfromlabel.8:1.3
--- src/external/bsd/bind/dist/bin/dnssec/dnssec-keyfromlabel.8:1.2	Wed Feb 16 03:46:45 2011
+++ src/external/bsd/bind/dist/bin/dnssec/dnssec-keyfromlabel.8	Tue Jul  5 21:59:18 2011
@@ -1,6 +1,6 @@
-.\"	$NetBSD: dnssec-keyfromlabel.8,v 1.2 2011/02/16 03:46:45 christos Exp $
+.\"	$NetBSD: dnssec-keyfromlabel.8,v 1.3 2011/07/05 21:59:18 spz Exp $
 .\"
-.\" Copyright (C) 2008-2010 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2008-2011 Internet Systems Consortium, Inc. ("ISC")
 .\" 
 .\" Permission to use, copy, modify, and/or distribute this software for any
 .\" purpose with or without fee is hereby granted, provided that the above
@@ -14,7 +14,7 @@
 .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 .\" PERFORMANCE OF THIS SOFTWARE.
 .\"
-.\" Id: dnssec-keyfromlabel.8,v 1.18.14.1 2011-02-03 12:29:12 tbox Exp
+.\" Id: dnssec-keyfromlabel.8,v 1.18.14.1.2.1 2011-06-09 03:41:05 tbox Exp
 .\"
 .hy 0
 .ad l
@@ -217,5 +217,5 @@
 .PP
 Internet Systems Consortium
 .SH "COPYRIGHT"
-Copyright \(co 2008\-2010 Internet Systems Consortium, Inc. ("ISC")
+Copyright \(co 2008\-2011 Internet Systems Consortium, Inc. ("ISC")
 .br

Index: src/external/bsd/bind/dist/bin/named/bind9.xsl.h
diff -u src/external/bsd/bind/dist/bin/named/bind9.xsl.h:1.2 src/external/bsd/bind/dist/bin/named/bind9.xsl.h:1.3
--- src/external/bsd/bind/dist/bin/named/bind9.xsl.h:1.2	Wed Feb 16 03:46:46 2011
+++ src/external/bsd/bind/dist/bin/named/bind9.xsl.h	Tue Jul  5 21:59:18 2011
@@ -1,8 +1,8 @@
-/*	$NetBSD: bind9.xsl.h,v 1.2 2011/02/16 03:46:46 christos Exp $	*/
+/*	$NetBSD: bind9.xsl.h,v 1.3 2011/07/05 21:59:18 spz Exp $	*/
 
 /*
- * Generated by convertxsl.pl 1.14 2008/07/17 23:43:26 jinmei Exp  
- * From bind9.xsl 1.21 2009/01/27 23:47:54 tbox Exp 
+ * Generated by convertxsl.pl 1.14 2008-07-17 23:43:26 jinmei Exp  
+ * From bind9.xsl 1.21 2009-01-27 23:47:54 tbox Exp 
  */
 static char xslmsg[] =
 	"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
@@ -22,7 +22,7 @@
 	" - PERFORMANCE OF THIS SOFTWARE.\n"
 	"-->\n"
 	"\n"
-	"<!-- \045Id: bind9.xsl,v 1.21 2009/01/27 23:47:54 tbox Exp \045 -->\n"
+	"<!-- \045Id: bind9.xsl,v 1.21 2009-01-27 23:47:54 tbox Exp \045 -->\n"
 	"\n"
 	"<xsl:stylesheet version=\"1.0\"\n"
 	" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"\n";
Index: src/external/bsd/bind/dist/bin/named/config.c
diff -u src/external/bsd/bind/dist/bin/named/config.c:1.2 src/external/bsd/bind/dist/bin/named/config.c:1.3
--- src/external/bsd/bind/dist/bin/named/config.c:1.2	Wed Feb 16 03:46:46 2011
+++ src/external/bsd/bind/dist/bin/named/config.c	Tue Jul  5 21:59:18 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: config.c,v 1.2 2011/02/16 03:46:46 christos Exp $	*/
+/*	$NetBSD: config.c,v 1.3 2011/07/05 21:59:18 spz Exp $	*/
 
 /*
- * Copyright (C) 2004-2010  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2011  Internet Systems Consortium, Inc. ("ISC")
  * Copyright (C) 2001-2003  Internet Software Consortium.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: config.c,v 1.113.16.1 2011-02-03 05:50:05 marka Exp */
+/* Id: config.c,v 1.113.16.1.2.1 2011-06-02 23:47:28 tbox Exp */
 
 /*! \file */
 
Index: src/external/bsd/bind/dist/bin/named/update.c
diff -u src/external/bsd/bind/dist/bin/named/update.c:1.2 src/external/bsd/bind/dist/bin/named/update.c:1.3
--- src/external/bsd/bind/dist/bin/named/update.c:1.2	Wed Feb 16 03:46:46 2011
+++ src/external/bsd/bind/dist/bin/named/update.c	Tue Jul  5 21:59:18 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: update.c,v 1.2 2011/02/16 03:46:46 christos Exp $	*/
+/*	$NetBSD: update.c,v 1.3 2011/07/05 21:59:18 spz Exp $	*/
 
 /*
- * 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
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: update.c,v 1.186.16.1 2011-02-03 06:18:51 marka Exp */
+/* Id: update.c,v 1.186.16.1.2.1 2011-06-02 23:47:28 tbox Exp */
 
 #include <config.h>
 
@@ -3438,7 +3438,7 @@
 	 */
 	for (tuple = ISC_LIST_HEAD(diff->tuples);
 	     tuple != NULL; tuple = next) {
-	
+
 		next = ISC_LIST_NEXT(tuple, link);
 
 		if (tuple->rdata.type != dns_rdatatype_dnskey)
@@ -3502,7 +3502,7 @@
 	     tuple = ISC_LIST_HEAD(temp_diff.tuples)) {
 
 		ISC_LIST_UNLINK(temp_diff.tuples, tuple, link);
-                ISC_LIST_APPEND(diff->tuples, tuple, link);
+		ISC_LIST_APPEND(diff->tuples, tuple, link);
 
 		dns_rdata_tostruct(&tuple->rdata, &dnskey, NULL);
 		if ((dnskey.flags &

Index: src/external/bsd/bind/dist/bin/named/query.c
diff -u src/external/bsd/bind/dist/bin/named/query.c:1.4 src/external/bsd/bind/dist/bin/named/query.c:1.5
--- src/external/bsd/bind/dist/bin/named/query.c:1.4	Sun May 29 15:17:09 2011
+++ src/external/bsd/bind/dist/bin/named/query.c	Tue Jul  5 21:59:18 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: query.c,v 1.4 2011/05/29 15:17:09 spz Exp $	*/
+/*	$NetBSD: query.c,v 1.5 2011/07/05 21:59:18 spz Exp $	*/
 
 /*
  * Copyright (C) 2004-2011  Internet Systems Consortium, Inc. ("ISC")
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: query.c,v 1.353.8.2.2.1 2011-04-27 17:06:27 each Exp */
+/* Id: query.c,v 1.353.8.2.2.5 2011-06-09 03:17:10 marka Exp */
 
 /*! \file */
 
@@ -639,6 +639,7 @@
 		dns_db_attach(db, &dbversion->db);
 		dns_db_currentversion(db, &dbversion->version);
 		dbversion->acl_checked = ISC_FALSE;
+		dbversion->queryok = ISC_FALSE;
 		ISC_LIST_APPEND(client->query.activeversions,
 				dbversion, link);
 	}
@@ -770,6 +771,7 @@
 		dbversion->queryok = ISC_FALSE;
 		return (DNS_R_REFUSED);
 	}
+	dbversion->queryok = ISC_TRUE;
 
  approved:
 	/* Transfer ownership, if necessary. */
@@ -4093,7 +4095,7 @@
 			if (qtype == dns_rdatatype_rrsig ||
 			    qtype == dns_rdatatype_sig)
 				result = DNS_R_NXRRSET;
-			else 
+			else
 				result = dns_db_find(*dbp, qnamef, version,
 						     qtype, 0, client->now,
 						     nodep, found, *rdatasetp,
@@ -4113,8 +4115,13 @@
 		}
 		break;
 	case DNS_R_DNAME:
-		policy = DNS_RPZ_POLICY_RECORD;
-		break;
+		/*
+		 * DNAME policy RRs have very few if any uses that are not
+		 * better served with simple wildcards.  Making the work would
+		 * require complications to get the number of labels matched
+		 * in the name or the found name itself to the main DNS_R_DNAME
+		 * case in query_find(). So fall through to treat them as NODATA.
+		 */
 	case DNS_R_NXRRSET:
 		policy = DNS_RPZ_POLICY_NODATA;
 		break;
@@ -5324,6 +5331,7 @@
 				break;
 			case DNS_RPZ_POLICY_RECORD:
 				if (type == dns_rdatatype_any &&
+				    result != DNS_R_CNAME &&
 				    dns_rdataset_isassociated(rdataset))
 					dns_rdataset_disassociate(rdataset);
 				break;

Index: src/external/bsd/bind/dist/bin/rndc/rndc.c
diff -u src/external/bsd/bind/dist/bin/rndc/rndc.c:1.2 src/external/bsd/bind/dist/bin/rndc/rndc.c:1.3
--- src/external/bsd/bind/dist/bin/rndc/rndc.c:1.2	Wed Feb 16 03:46:48 2011
+++ src/external/bsd/bind/dist/bin/rndc/rndc.c	Tue Jul  5 21:59:18 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: rndc.c,v 1.2 2011/02/16 03:46:48 christos Exp $	*/
+/*	$NetBSD: rndc.c,v 1.3 2011/07/05 21:59:18 spz Exp $	*/
 
 /*
- * Copyright (C) 2004-2010  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2011  Internet Systems Consortium, Inc. ("ISC")
  * Copyright (C) 2000-2003  Internet Software Consortium.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: rndc.c,v 1.131.20.1 2011-02-03 11:44:45 marka Exp */
+/* Id: rndc.c,v 1.131.20.1.2.1 2011-06-02 23:47:28 tbox Exp */
 
 /*! \file */
 

Index: src/external/bsd/bind/dist/bin/tests/resolver/t_resolver.c
diff -u src/external/bsd/bind/dist/bin/tests/resolver/t_resolver.c:1.2 src/external/bsd/bind/dist/bin/tests/resolver/t_resolver.c:1.3
--- src/external/bsd/bind/dist/bin/tests/resolver/t_resolver.c:1.2	Wed Feb 16 03:46:51 2011
+++ src/external/bsd/bind/dist/bin/tests/resolver/t_resolver.c	Tue Jul  5 21:59:18 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_resolver.c,v 1.2 2011/02/16 03:46:51 christos Exp $	*/
+/*	$NetBSD: t_resolver.c,v 1.3 2011/07/05 21:59:18 spz Exp $	*/
 
 /*
  * Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
@@ -16,7 +16,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: t_resolver.c,v 1.2.2.2 2011-02-03 05:50:06 marka Exp */
+/* Id: t_resolver.c,v 1.2.2.2.2.1 2011-06-02 23:47:28 tbox Exp */
 
 #include <config.h>
 
@@ -54,7 +54,7 @@
 {
 	isc_sockaddr_t local_address;
 	isc_sockaddr_any(&local_address);
-	
+
 	CHECK(dns_dispatch_getudp(dispatch_manager, socket_manager, task_manager,
 				  &local_address, 4096, 100, 100, 100, 500,
 				  0, 0, /* unsigned int attributes, unsigned int mask, */
@@ -85,7 +85,7 @@
 static isc_result_t
 make_resolver(dns_resolver_t **resolverp) {
 	isc_result_t result;
-	
+
 	result = dns_resolver_create(view,
 			    task_manager, 1,
 			    socket_manager,
@@ -130,7 +130,7 @@
 		 "The default timeout is returned from _gettimeout()");
 	setup();
 	CHECK(make_resolver(&resolver));
-	
+
 	timeout = dns_resolver_gettimeout(resolver);
 	t_info("The default timeout is %d second%s\n", timeout, (timeout == 1 ? "" : "s"));
 	test_result = (timeout > 0) ? T_PASS : T_FAIL;
@@ -151,7 +151,7 @@
 		 "_settimeout() can change the timeout to a non-default");
 	setup();
 	CHECK(make_resolver(&resolver));
-	
+
 	default_timeout = dns_resolver_gettimeout(resolver);
 	t_info("The default timeout is %d second%s\n", default_timeout,
 	       (default_timeout == 1 ? "" : "s"));
@@ -164,7 +164,7 @@
 
 	destroy_resolver(&resolver);
 	teardown();
-	
+
 	t_result(test_result);
 }
 
@@ -179,7 +179,7 @@
 		 " by specifying 0 as the timeout.");
 	setup();
 	CHECK(make_resolver(&resolver));
-	
+
 	default_timeout = dns_resolver_gettimeout(resolver);
 	t_info("The default timeout is %d second%s\n", default_timeout,
 	       (default_timeout == 1 ? "" : "s"));
@@ -195,7 +195,7 @@
 
 	destroy_resolver(&resolver);
 	teardown();
-	
+
 	t_result(test_result);
 }
 
@@ -209,7 +209,7 @@
 		 "_settimeout() cannot set the value larger than the maximum.");
 	setup();
 	CHECK(make_resolver(&resolver));
-	
+
 	dns_resolver_settimeout(resolver, 4000000);
 	timeout = dns_resolver_gettimeout(resolver);
 	t_info("The new timeout is %d second%s\n", timeout,
@@ -219,7 +219,7 @@
 
 	destroy_resolver(&resolver);
 	teardown();
-	
+
 	t_result(test_result);
 }
 

Index: src/external/bsd/bind/dist/lib/dns/dispatch.c
diff -u src/external/bsd/bind/dist/lib/dns/dispatch.c:1.2 src/external/bsd/bind/dist/lib/dns/dispatch.c:1.3
--- src/external/bsd/bind/dist/lib/dns/dispatch.c:1.2	Wed Feb 16 03:47:03 2011
+++ src/external/bsd/bind/dist/lib/dns/dispatch.c	Tue Jul  5 21:59:19 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: dispatch.c,v 1.2 2011/02/16 03:47:03 christos Exp $	*/
+/*	$NetBSD: dispatch.c,v 1.3 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
- * Copyright (C) 2004-2009  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2009, 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
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: dispatch.c,v 1.168.248.1 2011-02-03 05:50:06 marka Exp */
+/* Id: dispatch.c,v 1.168.248.1.2.1 2011-06-02 23:47:34 tbox Exp */
 
 /*! \file */
 
Index: src/external/bsd/bind/dist/lib/dns/masterdump.c
diff -u src/external/bsd/bind/dist/lib/dns/masterdump.c:1.2 src/external/bsd/bind/dist/lib/dns/masterdump.c:1.3
--- src/external/bsd/bind/dist/lib/dns/masterdump.c:1.2	Wed Feb 16 03:47:04 2011
+++ src/external/bsd/bind/dist/lib/dns/masterdump.c	Tue Jul  5 21:59:19 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: masterdump.c,v 1.2 2011/02/16 03:47:04 christos Exp $	*/
+/*	$NetBSD: masterdump.c,v 1.3 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
- * Copyright (C) 2004-2009  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2009, 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
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: masterdump.c,v 1.99 2009-11-17 23:55:18 marka Exp */
+/* Id: masterdump.c,v 1.99.328.3 2011-06-21 20:15:47 each Exp */
 
 /*! \file */
 
@@ -412,6 +412,7 @@
 	isc_uint32_t current_ttl;
 	isc_boolean_t current_ttl_valid;
 	dns_rdatatype_t type;
+	unsigned int type_start;
 
 	REQUIRE(DNS_RDATASET_VALID(rdataset));
 
@@ -493,29 +494,26 @@
 		 * Type.
 		 */
 
-		if (rdataset->type == 0) {
+		if ((rdataset->attributes & DNS_RDATASETATTR_NEGATIVE) != 0) {
 			type = rdataset->covers;
 		} else {
 			type = rdataset->type;
 		}
 
-		{
-			unsigned int type_start;
-			INDENT_TO(type_column);
-			type_start = target->used;
-			if (rdataset->type == 0)
-				RETERR(str_totext("\\-", target));
-			result = dns_rdatatype_totext(type, target);
-			if (result != ISC_R_SUCCESS)
-				return (result);
-			column += (target->used - type_start);
-		}
+		INDENT_TO(type_column);
+		type_start = target->used;
+		if ((rdataset->attributes & DNS_RDATASETATTR_NEGATIVE) != 0)
+			RETERR(str_totext("\\-", target));
+		result = dns_rdatatype_totext(type, target);
+		if (result != ISC_R_SUCCESS)
+			return (result);
+		column += (target->used - type_start);
 
 		/*
 		 * Rdata.
 		 */
 		INDENT_TO(rdata_column);
-		if (rdataset->type == 0) {
+		if ((rdataset->attributes & DNS_RDATASETATTR_NEGATIVE) != 0) {
 			if (NXDOMAIN(rdataset))
 				RETERR(str_totext(";-$NXDOMAIN\n", target));
 			else
@@ -837,26 +835,6 @@
 
 #define MAXSORT 64
 
-static const char *trustnames[] = {
-	"none",
-	"pending-additional",
-	"pending-answer",
-	"additional",
-	"glue",
-	"answer",
-	"authauthority",
-	"authanswer",
-	"secure",
-	"local" /* aka ultimate */
-};
-
-const char *
-dns_trust_totext(dns_trust_t trust) {
-	if (trust >= sizeof(trustnames)/sizeof(*trustnames))
-		return ("bad");
-	return (trustnames[trust]);
-}
-
 static isc_result_t
 dump_rdatasets_text(isc_mem_t *mctx, dns_name_t *name,
 		    dns_rdatasetiter_t *rdsiter, dns_totext_ctx_t *ctx,
@@ -896,12 +874,9 @@
 	for (i = 0; i < n; i++) {
 		dns_rdataset_t *rds = sorted[i];
 		if (ctx->style.flags & DNS_STYLEFLAG_TRUST) {
-			unsigned int trust = rds->trust;
-			INSIST(trust < (sizeof(trustnames) /
-					sizeof(trustnames[0])));
-			fprintf(f, "; %s\n", trustnames[trust]);
+			fprintf(f, "; %s\n", dns_trust_totext(rds->trust));
 		}
-		if (rds->type == 0 &&
+		if (((rds->attributes & DNS_RDATASETATTR_NEGATIVE) != 0) &&
 		    (ctx->style.flags & DNS_STYLEFLAG_NCACHE) == 0) {
 			/* Omit negative cache entries */
 		} else {
@@ -1066,7 +1041,7 @@
 		dns_rdataset_init(&rdataset);
 		dns_rdatasetiter_current(rdsiter, &rdataset);
 
-		if (rdataset.type == 0 &&
+		if (((rdataset.attributes & DNS_RDATASETATTR_NEGATIVE) != 0) &&
 		    (ctx->style.flags & DNS_STYLEFLAG_NCACHE) == 0) {
 			/* Omit negative cache entries */
 		} else {
Index: src/external/bsd/bind/dist/lib/dns/nsec3.c
diff -u src/external/bsd/bind/dist/lib/dns/nsec3.c:1.2 src/external/bsd/bind/dist/lib/dns/nsec3.c:1.3
--- src/external/bsd/bind/dist/lib/dns/nsec3.c:1.2	Wed Feb 16 03:47:04 2011
+++ src/external/bsd/bind/dist/lib/dns/nsec3.c	Tue Jul  5 21:59:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: nsec3.c,v 1.2 2011/02/16 03:47:04 christos Exp $	*/
+/*	$NetBSD: nsec3.c,v 1.3 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
  * Copyright (C) 2006, 2008-2010  Internet Systems Consortium, Inc. ("ISC")
@@ -16,7 +16,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: nsec3.c,v 1.19 2010-12-07 02:53:34 marka Exp */
+/* Id: nsec3.c,v 1.19.96.1 2011-06-21 20:15:48 each Exp */
 
 #include <config.h>
 
@@ -1581,7 +1581,7 @@
 
 isc_result_t
 dns_nsec3_delnsec3sx(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
-		     dns_rdatatype_t type, dns_diff_t *diff)
+		     dns_rdatatype_t privatetype, dns_diff_t *diff)
 {
 	dns_dbnode_t *node = NULL;
 	dns_rdata_nsec3param_t nsec3param;
@@ -1626,9 +1626,9 @@
 	dns_rdataset_disassociate(&rdataset);
 
  try_private:
-	if (type == 0)
+	if (privatetype == 0)
 		goto success;
-	result = dns_db_findrdataset(db, node, version, type, 0, 0,
+	result = dns_db_findrdataset(db, node, version, privatetype, 0, 0,
 				     &rdataset, NULL);
 	if (result == ISC_R_NOTFOUND)
 		goto success;
@@ -1683,7 +1683,7 @@
 
 isc_result_t
 dns_nsec3_activex(dns_db_t *db, dns_dbversion_t *version,
-		  isc_boolean_t complete, dns_rdatatype_t type,
+		  isc_boolean_t complete, dns_rdatatype_t privatetype,
 		  isc_boolean_t *answer)
 {
 	dns_dbnode_t *node = NULL;
@@ -1732,11 +1732,11 @@
 		*answer = ISC_FALSE;
 
  try_private:
-	if (type == 0 || complete) {
+	if (privatetype == 0 || complete) {
 		*answer = ISC_FALSE;
 		return (ISC_R_SUCCESS);
 	}
-	result = dns_db_findrdataset(db, node, version, type, 0, 0,
+	result = dns_db_findrdataset(db, node, version, privatetype, 0, 0,
 				     &rdataset, NULL);
 
 	dns_db_detachnode(db, &node);
Index: src/external/bsd/bind/dist/lib/dns/rdataset.c
diff -u src/external/bsd/bind/dist/lib/dns/rdataset.c:1.2 src/external/bsd/bind/dist/lib/dns/rdataset.c:1.3
--- src/external/bsd/bind/dist/lib/dns/rdataset.c:1.2	Wed Feb 16 03:47:04 2011
+++ src/external/bsd/bind/dist/lib/dns/rdataset.c	Tue Jul  5 21:59:19 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: rdataset.c,v 1.2 2011/02/16 03:47:04 christos Exp $	*/
+/*	$NetBSD: rdataset.c,v 1.3 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
- * 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
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: rdataset.c,v 1.86 2010-02-25 05:08:01 tbox Exp */
+/* Id: rdataset.c,v 1.86.220.3 2011-06-21 20:15:53 each Exp */
 
 /*! \file */
 
@@ -36,6 +36,26 @@
 #include <dns/rdataset.h>
 #include <dns/compress.h>
 
+static const char *trustnames[] = {
+	"none",
+	"pending-additional",
+	"pending-answer",
+	"additional",
+	"glue",
+	"answer",
+	"authauthority",
+	"authanswer",
+	"secure",
+	"local" /* aka ultimate */
+};
+
+const char *
+dns_trust_totext(dns_trust_t trust) {
+	if (trust >= sizeof(trustnames)/sizeof(*trustnames))
+		return ("bad");
+	return (trustnames[trust]);
+}
+
 void
 dns_rdataset_init(dns_rdataset_t *rdataset) {
 
@@ -327,7 +347,7 @@
 		count = 1;
 		result = dns_rdataset_first(rdataset);
 		INSIST(result == ISC_R_NOMORE);
-	} else if (rdataset->type == 0) {
+	} else if ((rdataset->attributes & DNS_RDATASETATTR_NEGATIVE) != 0) {
 		/*
 		 * This is a negative caching rdataset.
 		 */
Index: src/external/bsd/bind/dist/lib/dns/rdataslab.c
diff -u src/external/bsd/bind/dist/lib/dns/rdataslab.c:1.2 src/external/bsd/bind/dist/lib/dns/rdataslab.c:1.3
--- src/external/bsd/bind/dist/lib/dns/rdataslab.c:1.2	Wed Feb 16 03:47:04 2011
+++ src/external/bsd/bind/dist/lib/dns/rdataslab.c	Tue Jul  5 21:59:19 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: rdataslab.c,v 1.2 2011/02/16 03:47:04 christos Exp $	*/
+/*	$NetBSD: rdataslab.c,v 1.3 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
- * 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
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: rdataslab.c,v 1.52.148.1 2011-02-03 07:39:03 marka Exp */
+/* Id: rdataslab.c,v 1.52.148.1.2.1 2011-06-02 23:47:35 tbox Exp */
 
 /*! \file */
 
@@ -152,7 +152,7 @@
 	if (nalloc > 0xffff)
 		return (ISC_R_NOSPACE);
 
-	
+
 	if (nalloc != 0) {
 		x = isc_mem_get(mctx, nalloc * sizeof(struct xrdata));
 		if (x == NULL)

Index: src/external/bsd/bind/dist/lib/dns/message.c
diff -u src/external/bsd/bind/dist/lib/dns/message.c:1.6 src/external/bsd/bind/dist/lib/dns/message.c:1.7
--- src/external/bsd/bind/dist/lib/dns/message.c:1.6	Wed Feb 16 03:47:04 2011
+++ src/external/bsd/bind/dist/lib/dns/message.c	Tue Jul  5 21:59:19 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: message.c,v 1.6 2011/02/16 03:47:04 christos Exp $	*/
+/*	$NetBSD: message.c,v 1.7 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
- * 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
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: message.c,v 1.254 2010-06-03 05:23:27 marka Exp */
+/* Id: message.c,v 1.254.186.3 2011-06-21 20:15:47 each Exp */
 
 /*! \file */
 
@@ -2518,7 +2518,7 @@
 
 isc_result_t
 dns_message_reply(dns_message_t *msg, isc_boolean_t want_question_section) {
-	unsigned int first_section;
+	unsigned int clear_after;
 	isc_result_t result;
 
 	REQUIRE(DNS_MESSAGE_VALID(msg));
@@ -2530,15 +2530,15 @@
 	    msg->opcode != dns_opcode_notify)
 		want_question_section = ISC_FALSE;
 	if (msg->opcode == dns_opcode_update)
-		first_section = DNS_SECTION_ADDITIONAL;
+		clear_after = DNS_SECTION_PREREQUISITE;
 	else if (want_question_section) {
 		if (!msg->question_ok)
 			return (DNS_R_FORMERR);
-		first_section = DNS_SECTION_ANSWER;
+		clear_after = DNS_SECTION_ANSWER;
 	} else
-		first_section = DNS_SECTION_QUESTION;
+		clear_after = DNS_SECTION_QUESTION;
 	msg->from_to_wire = DNS_MESSAGE_INTENTRENDER;
-	msgresetnames(msg, first_section);
+	msgresetnames(msg, clear_after);
 	msgresetopt(msg);
 	msgresetsigs(msg, ISC_TRUE);
 	msginitprivate(msg);

Index: src/external/bsd/bind/dist/lib/dns/ncache.c
diff -u src/external/bsd/bind/dist/lib/dns/ncache.c:1.3 src/external/bsd/bind/dist/lib/dns/ncache.c:1.4
--- src/external/bsd/bind/dist/lib/dns/ncache.c:1.3	Sun May 29 15:17:09 2011
+++ src/external/bsd/bind/dist/lib/dns/ncache.c	Tue Jul  5 21:59:19 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: ncache.c,v 1.3 2011/05/29 15:17:09 spz Exp $	*/
+/*	$NetBSD: ncache.c,v 1.4 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
- * Copyright (C) 2004, 2005, 2007, 2008, 2010  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2008, 2010, 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
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: ncache.c,v 1.50.124.1.2.1 2011-05-27 00:57:31 each Exp */
+/* Id: ncache.c,v 1.50.124.1.2.3 2011-06-21 20:15:47 each Exp */
 
 /*! \file */
 
@@ -245,6 +245,7 @@
 	RUNTIME_CHECK(dns_rdatalist_tordataset(&ncrdatalist, &ncrdataset)
 		      == ISC_R_SUCCESS);
 	ncrdataset.trust = trust;
+	ncrdataset.attributes |= DNS_RDATASETATTR_NEGATIVE;
 	if (message->rcode == dns_rcode_nxdomain)
 		ncrdataset.attributes |= DNS_RDATASETATTR_NXDOMAIN;
 	if (optout)
@@ -275,6 +276,7 @@
 
 	REQUIRE(rdataset != NULL);
 	REQUIRE(rdataset->type == 0);
+	REQUIRE((rdataset->attributes & DNS_RDATASETATTR_NEGATIVE) != 0);
 
 	savedbuffer = *target;
 	count = 0;
@@ -503,6 +505,7 @@
 
 	REQUIRE(ncacherdataset != NULL);
 	REQUIRE(ncacherdataset->type == 0);
+	REQUIRE((ncacherdataset->attributes & DNS_RDATASETATTR_NEGATIVE) != 0);
 	REQUIRE(name != NULL);
 	REQUIRE(!dns_rdataset_isassociated(rdataset));
 	REQUIRE(type != dns_rdatatype_rrsig);
@@ -579,6 +582,7 @@
 
 	REQUIRE(ncacherdataset != NULL);
 	REQUIRE(ncacherdataset->type == 0);
+	REQUIRE((ncacherdataset->attributes & DNS_RDATASETATTR_NEGATIVE) != 0);
 	REQUIRE(name != NULL);
 	REQUIRE(!dns_rdataset_isassociated(rdataset));
 
@@ -678,6 +682,7 @@
 
 	REQUIRE(ncacherdataset != NULL);
 	REQUIRE(ncacherdataset->type == 0);
+	REQUIRE((ncacherdataset->attributes & DNS_RDATASETATTR_NEGATIVE) != 0);
 	REQUIRE(found != NULL);
 	REQUIRE(!dns_rdataset_isassociated(rdataset));
 
Index: src/external/bsd/bind/dist/lib/dns/xfrin.c
diff -u src/external/bsd/bind/dist/lib/dns/xfrin.c:1.3 src/external/bsd/bind/dist/lib/dns/xfrin.c:1.4
--- src/external/bsd/bind/dist/lib/dns/xfrin.c:1.3	Sun May 29 15:17:10 2011
+++ src/external/bsd/bind/dist/lib/dns/xfrin.c	Tue Jul  5 21:59:19 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: xfrin.c,v 1.3 2011/05/29 15:17:10 spz Exp $	*/
+/*	$NetBSD: xfrin.c,v 1.4 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
- * Copyright (C) 2004-2008  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008, 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
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: xfrin.c,v 1.166.522.2 2011-02-19 01:21:27 each Exp */
+/* Id: xfrin.c,v 1.166.522.2.2.1 2011-06-02 23:47:35 tbox Exp */
 
 /*! \file */
 

Index: src/external/bsd/bind/dist/lib/dns/rbtdb.c
diff -u src/external/bsd/bind/dist/lib/dns/rbtdb.c:1.8 src/external/bsd/bind/dist/lib/dns/rbtdb.c:1.9
--- src/external/bsd/bind/dist/lib/dns/rbtdb.c:1.8	Sun May 29 15:17:09 2011
+++ src/external/bsd/bind/dist/lib/dns/rbtdb.c	Tue Jul  5 21:59:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rbtdb.c,v 1.8 2011/05/29 15:17:09 spz Exp $	*/
+/*	$NetBSD: rbtdb.c,v 1.9 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
  * Copyright (C) 2004-2011  Internet Systems Consortium, Inc. ("ISC")
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: rbtdb.c,v 1.310.8.1 2011-02-18 23:23:08 each Exp */
+/* Id: rbtdb.c,v 1.310.8.1.2.1 2011-06-21 20:15:48 each Exp */
 
 /*! \file */
 
@@ -281,6 +281,7 @@
 #define RDATASET_ATTR_RESIGN            0x0020
 #define RDATASET_ATTR_STATCOUNT         0x0040
 #define RDATASET_ATTR_OPTOUT		0x0080
+#define RDATASET_ATTR_NEGATIVE          0x0100
 
 typedef struct acache_cbarg {
 	dns_rdatasetadditional_t        type;
@@ -319,6 +320,8 @@
 	(((header)->attributes & RDATASET_ATTR_RESIGN) != 0)
 #define OPTOUT(header) \
 	(((header)->attributes & RDATASET_ATTR_OPTOUT) != 0)
+#define NEGATIVE(header) \
+	(((header)->attributes & RDATASET_ATTR_NEGATIVE) != 0)
 
 #define DEFAULT_NODE_LOCK_COUNT         7       /*%< Should be prime. */
 
@@ -698,11 +701,13 @@
 	/* At the moment we count statistics only for cache DB */
 	INSIST(IS_CACHE(rbtdb));
 
-	if (NXDOMAIN(header))
-		statattributes = DNS_RDATASTATSTYPE_ATTR_NXDOMAIN;
-	else if (RBTDB_RDATATYPE_BASE(header->type) == 0) {
-		statattributes = DNS_RDATASTATSTYPE_ATTR_NXRRSET;
-		base = RBTDB_RDATATYPE_EXT(header->type);
+	if (NEGATIVE(header)) {
+		if (NXDOMAIN(header))
+			statattributes = DNS_RDATASTATSTYPE_ATTR_NXDOMAIN;
+		else {
+			statattributes = DNS_RDATASTATSTYPE_ATTR_NXRRSET;
+			base = RBTDB_RDATATYPE_EXT(header->type);
+		}
 	} else
 		base = RBTDB_RDATATYPE_BASE(header->type);
 
@@ -2782,6 +2787,8 @@
 	rdataset->covers = RBTDB_RDATATYPE_EXT(header->type);
 	rdataset->ttl = header->rdh_ttl - now;
 	rdataset->trust = header->trust;
+	if (NEGATIVE(header))
+		rdataset->attributes |= DNS_RDATASETATTR_NEGATIVE;
 	if (NXDOMAIN(header))
 		rdataset->attributes |= DNS_RDATASETATTR_NXDOMAIN;
 	if (OPTOUT(header))
@@ -5013,7 +5020,7 @@
 		*nodep = node;
 	}
 
-	if (RBTDB_RDATATYPE_BASE(found->type) == 0) {
+	if (NEGATIVE(found)) {
 		/*
 		 * We found a negative cache entry.
 		 */
@@ -5682,7 +5689,7 @@
 	if (found == NULL)
 		return (ISC_R_NOTFOUND);
 
-	if (RBTDB_RDATATYPE_BASE(found->type) == 0) {
+	if (NEGATIVE(found)) {
 		/*
 		 * We found a negative cache entry.
 		 */
@@ -5893,7 +5900,7 @@
 	negtype = 0;
 	if (rbtversion == NULL && !newheader_nx) {
 		rdtype = RBTDB_RDATATYPE_BASE(newheader->type);
-		if (rdtype == 0) {
+		if (NEGATIVE(newheader)) {
 			/*
 			 * We're adding a negative cache entry.
 			 */
@@ -6435,6 +6442,8 @@
 	} else {
 		newheader->serial = 1;
 		newheader->resign = 0;
+		if ((rdataset->attributes & DNS_RDATASETATTR_NEGATIVE) != 0)
+			newheader->attributes |= RDATASET_ATTR_NEGATIVE;
 		if ((rdataset->attributes & DNS_RDATASETATTR_NXDOMAIN) != 0)
 			newheader->attributes |= RDATASET_ATTR_NXDOMAIN;
 		if ((rdataset->attributes & DNS_RDATASETATTR_OPTOUT) != 0)
@@ -8160,7 +8169,7 @@
 
 	type = header->type;
 	rdtype = RBTDB_RDATATYPE_BASE(header->type);
-	if (rdtype == 0) {
+	if (NEGATIVE(header)) {
 		covers = RBTDB_RDATATYPE_EXT(header->type);
 		negtype = RBTDB_RDATATYPE_VALUE(covers, 0);
 	} else

Index: src/external/bsd/bind/dist/lib/dns/resolver.c
diff -u src/external/bsd/bind/dist/lib/dns/resolver.c:1.9 src/external/bsd/bind/dist/lib/dns/resolver.c:1.10
--- src/external/bsd/bind/dist/lib/dns/resolver.c:1.9	Sun May 29 15:17:09 2011
+++ src/external/bsd/bind/dist/lib/dns/resolver.c	Tue Jul  5 21:59:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: resolver.c,v 1.9 2011/05/29 15:17:09 spz Exp $	*/
+/*	$NetBSD: resolver.c,v 1.10 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
  * Copyright (C) 2004-2011  Internet Systems Consortium, Inc. ("ISC")
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: resolver.c,v 1.428.6.5 2011-02-18 23:41:51 mgraff Exp */
+/* Id: resolver.c,v 1.428.6.5.2.1 2011-06-21 20:15:53 each Exp */
 
 /*! \file */
 
@@ -437,6 +437,7 @@
 					 FCTX_ADDRINFO_TRIED) != 0)
 
 #define NXDOMAIN(r) (((r)->attributes & DNS_RDATASETATTR_NXDOMAIN) != 0)
+#define NEGATIVE(r) (((r)->attributes & DNS_RDATASETATTR_NEGATIVE) != 0)
 
 static void destroy(dns_resolver_t *res);
 static void empty_bucket(dns_resolver_t *res);
@@ -1061,7 +1062,7 @@
 		 * Negative results must be indicated in event->result.
 		 */
 		if (dns_rdataset_isassociated(event->rdataset) &&
-		    event->rdataset->type == dns_rdatatype_none) {
+		    NEGATIVE(event->rdataset)) {
 			INSIST(event->result == DNS_R_NCACHENXDOMAIN ||
 			       event->result == DNS_R_NCACHENXRRSET);
 		}
@@ -4168,7 +4169,7 @@
 	if (result != ISC_R_SUCCESS &&
 	    result != DNS_R_UNCHANGED)
 		goto noanswer_response;
-	if (ardataset != NULL && ardataset->type == 0) {
+	if (ardataset != NULL && NEGATIVE(ardataset)) {
 		if (NXDOMAIN(ardataset))
 			eresult = DNS_R_NCACHENXDOMAIN;
 		else
@@ -4489,7 +4490,7 @@
 					result = ISC_R_SUCCESS;
 					if (!need_validation &&
 					    ardataset != NULL &&
-					    ardataset->type == 0) {
+					    NEGATIVE(ardataset)) {
 						/*
 						 * The answer in the cache is
 						 * better than the answer we
@@ -4619,7 +4620,7 @@
 			if (result == DNS_R_UNCHANGED) {
 				if (ANSWER(rdataset) &&
 				    ardataset != NULL &&
-				    ardataset->type == 0) {
+				    NEGATIVE(ardataset)) {
 					/*
 					 * The answer in the cache is better
 					 * than the answer we found, and is
@@ -4649,7 +4650,7 @@
 			 * Negative results must be indicated in event->result.
 			 */
 			if (dns_rdataset_isassociated(event->rdataset) &&
-			    event->rdataset->type == dns_rdatatype_none) {
+			    NEGATIVE(event->rdataset)) {
 				INSIST(eresult == DNS_R_NCACHENXDOMAIN ||
 				       eresult == DNS_R_NCACHENXRRSET);
 			}
@@ -4729,7 +4730,7 @@
 		 * care about whether it is DNS_R_NCACHENXDOMAIN or
 		 * DNS_R_NCACHENXRRSET then extract it.
 		 */
-		if (ardataset->type == 0) {
+		if (NEGATIVE(ardataset)) {
 			/*
 			 * The cache data is a negative cache entry.
 			 */

Index: src/external/bsd/bind/dist/lib/dns/validator.c
diff -u src/external/bsd/bind/dist/lib/dns/validator.c:1.4 src/external/bsd/bind/dist/lib/dns/validator.c:1.5
--- src/external/bsd/bind/dist/lib/dns/validator.c:1.4	Sun May 29 15:17:09 2011
+++ src/external/bsd/bind/dist/lib/dns/validator.c	Tue Jul  5 21:59:19 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: validator.c,v 1.4 2011/05/29 15:17:09 spz Exp $	*/
+/*	$NetBSD: validator.c,v 1.5 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
- * Copyright (C) 2004-2010  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2011  Internet Systems Consortium, Inc. ("ISC")
  * Copyright (C) 2000-2003  Internet Software Consortium.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: validator.c,v 1.197.40.1 2011-05-27 00:57:31 each Exp */
+/* Id: validator.c,v 1.197.40.3 2011-06-21 20:15:54 each Exp */
 
 #include <config.h>
 
@@ -131,6 +131,8 @@
 #define SHUTDOWN(v)		(((v)->attributes & VALATTR_SHUTDOWN) != 0)
 #define CANCELED(v)		(((v)->attributes & VALATTR_CANCELED) != 0)
 
+#define NEGATIVE(r)	(((r)->attributes & DNS_RDATASETATTR_NEGATIVE) != 0)
+
 static void
 destroy(dns_validator_t *val);
 
@@ -744,7 +746,7 @@
 		name = dns_fixedname_name(&val->fname);
 		if ((val->attributes & VALATTR_INSECURITY) != 0 &&
 		    val->frdataset.covers == dns_rdatatype_ds &&
-		    val->frdataset.type == 0 &&
+		    NEGATIVE(&val->frdataset) &&
 		    isdelegation(name, &val->frdataset, DNS_R_NCACHENXRRSET)) {
 			if (val->mustbesecure) {
 				validator_log(val, ISC_LOG_WARNING,
@@ -3976,7 +3978,7 @@
 			val->attributes |= VALATTR_NEEDNODATA;
 		result = nsecvalidate(val, ISC_FALSE);
 	} else if (val->event->rdataset != NULL &&
-		    val->event->rdataset->type == 0)
+		    NEGATIVE(val->event->rdataset))
 	{
 		/*
 		 * This is a nonexistence validation.

Index: src/external/bsd/bind/dist/lib/dns/include/dns/masterdump.h
diff -u src/external/bsd/bind/dist/lib/dns/include/dns/masterdump.h:1.2 src/external/bsd/bind/dist/lib/dns/include/dns/masterdump.h:1.3
--- src/external/bsd/bind/dist/lib/dns/include/dns/masterdump.h:1.2	Wed Feb 16 03:47:06 2011
+++ src/external/bsd/bind/dist/lib/dns/include/dns/masterdump.h	Tue Jul  5 21:59:19 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: masterdump.h,v 1.2 2011/02/16 03:47:06 christos Exp $	*/
+/*	$NetBSD: masterdump.h,v 1.3 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
- * Copyright (C) 2004-2008  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008, 2011  Internet Systems Consortium, Inc. ("ISC")
  * Copyright (C) 1999-2002  Internet Software Consortium.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: masterdump.h,v 1.42 2008-09-24 02:46:23 marka Exp */
+/* Id: masterdump.h,v 1.42.596.2 2011-06-02 23:47:35 tbox Exp */
 
 #ifndef DNS_MASTERDUMP_H
 #define DNS_MASTERDUMP_H 1
@@ -334,9 +334,6 @@
 void
 dns_master_styledestroy(dns_master_style_t **style, isc_mem_t *mctx);
 
-const char *
-dns_trust_totext(dns_trust_t trust);
-
 ISC_LANG_ENDDECLS
 
 #endif /* DNS_MASTERDUMP_H */
Index: src/external/bsd/bind/dist/lib/dns/include/dns/rdataset.h
diff -u src/external/bsd/bind/dist/lib/dns/include/dns/rdataset.h:1.2 src/external/bsd/bind/dist/lib/dns/include/dns/rdataset.h:1.3
--- src/external/bsd/bind/dist/lib/dns/include/dns/rdataset.h:1.2	Wed Feb 16 03:47:06 2011
+++ src/external/bsd/bind/dist/lib/dns/include/dns/rdataset.h	Tue Jul  5 21:59:19 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: rdataset.h,v 1.2 2011/02/16 03:47:06 christos Exp $	*/
+/*	$NetBSD: rdataset.h,v 1.3 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
- * 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
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: rdataset.h,v 1.69 2010-02-25 05:08:01 tbox Exp */
+/* Id: rdataset.h,v 1.69.270.3 2011-06-21 20:15:54 each Exp */
 
 #ifndef DNS_RDATASET_H
 #define DNS_RDATASET_H 1
@@ -205,6 +205,7 @@
 #define DNS_RDATASETATTR_RESIGN		0x00040000
 #define DNS_RDATASETATTR_CLOSEST	0x00080000
 #define DNS_RDATASETATTR_OPTOUT		0x00100000	/*%< OPTOUT proof */
+#define DNS_RDATASETATTR_NEGATIVE	0x00200000
 
 /*%
  * _OMITDNSSEC:
@@ -652,6 +653,12 @@
  * Mark the rdataset to be expired in the backing database.
  */
 
+const char *
+dns_trust_totext(dns_trust_t trust);
+/*%<
+ * Display trust in textual form.
+ */
+
 ISC_LANG_ENDDECLS
 
 #endif /* DNS_RDATASET_H */
Index: src/external/bsd/bind/dist/lib/dns/include/dns/resolver.h
diff -u src/external/bsd/bind/dist/lib/dns/include/dns/resolver.h:1.2 src/external/bsd/bind/dist/lib/dns/include/dns/resolver.h:1.3
--- src/external/bsd/bind/dist/lib/dns/include/dns/resolver.h:1.2	Wed Feb 16 03:47:06 2011
+++ src/external/bsd/bind/dist/lib/dns/include/dns/resolver.h	Tue Jul  5 21:59:19 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: resolver.h,v 1.2 2011/02/16 03:47:06 christos Exp $	*/
+/*	$NetBSD: resolver.h,v 1.3 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
- * Copyright (C) 2004-2010  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2011  Internet Systems Consortium, Inc. ("ISC")
  * Copyright (C) 1999-2001, 2003  Internet Software Consortium.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: resolver.h,v 1.67.86.1 2011-02-03 05:50:07 marka Exp */
+/* Id: resolver.h,v 1.67.86.1.2.1 2011-06-02 23:47:36 tbox Exp */
 
 #ifndef DNS_RESOLVER_H
 #define DNS_RESOLVER_H 1

Index: src/external/bsd/bind/dist/lib/isc/task.c
diff -u src/external/bsd/bind/dist/lib/isc/task.c:1.2 src/external/bsd/bind/dist/lib/isc/task.c:1.3
--- src/external/bsd/bind/dist/lib/isc/task.c:1.2	Wed Feb 16 03:47:11 2011
+++ src/external/bsd/bind/dist/lib/isc/task.c	Tue Jul  5 21:59:19 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: task.c,v 1.2 2011/02/16 03:47:11 christos Exp $	*/
+/*	$NetBSD: task.c,v 1.3 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
- * Copyright (C) 2004-2010  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2011  Internet Systems Consortium, Inc. ("ISC")
  * Copyright (C) 1998-2003  Internet Software Consortium.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: task.c,v 1.115.14.1 2011-02-03 05:50:07 marka Exp */
+/* Id: task.c,v 1.115.14.1.2.1 2011-06-02 23:47:36 tbox Exp */
 
 /*! \file
  * \author Principal Author: Bob Halley
Index: src/external/bsd/bind/dist/lib/isc/timer.c
diff -u src/external/bsd/bind/dist/lib/isc/timer.c:1.2 src/external/bsd/bind/dist/lib/isc/timer.c:1.3
--- src/external/bsd/bind/dist/lib/isc/timer.c:1.2	Wed Feb 16 03:47:11 2011
+++ src/external/bsd/bind/dist/lib/isc/timer.c	Tue Jul  5 21:59:19 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: timer.c,v 1.2 2011/02/16 03:47:11 christos Exp $	*/
+/*	$NetBSD: timer.c,v 1.3 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
- * Copyright (C) 2004, 2005, 2007-2009  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007-2009, 2011  Internet Systems Consortium, Inc. ("ISC")
  * Copyright (C) 1998-2002  Internet Software Consortium.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: timer.c,v 1.95.302.1 2011-02-03 05:50:07 marka Exp */
+/* Id: timer.c,v 1.95.302.1.2.1 2011-06-02 23:47:36 tbox Exp */
 
 /*! \file */
 

Index: src/external/bsd/bind/dist/lib/isc/include/isc/task.h
diff -u src/external/bsd/bind/dist/lib/isc/include/isc/task.h:1.2 src/external/bsd/bind/dist/lib/isc/include/isc/task.h:1.3
--- src/external/bsd/bind/dist/lib/isc/include/isc/task.h:1.2	Wed Feb 16 03:47:13 2011
+++ src/external/bsd/bind/dist/lib/isc/include/isc/task.h	Tue Jul  5 21:59:19 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: task.h,v 1.2 2011/02/16 03:47:13 christos Exp $	*/
+/*	$NetBSD: task.h,v 1.3 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
- * Copyright (C) 2004-2007, 2009, 2010  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009-2011  Internet Systems Consortium, Inc. ("ISC")
  * Copyright (C) 1998-2001, 2003  Internet Software Consortium.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: task.h,v 1.69.14.1 2011-02-03 05:50:07 marka Exp */
+/* Id: task.h,v 1.69.14.1.2.1 2011-06-02 23:47:36 tbox Exp */
 
 #ifndef ISC_TASK_H
 #define ISC_TASK_H 1

Index: src/external/bsd/bind/dist/lib/isc/unix/socket.c
diff -u src/external/bsd/bind/dist/lib/isc/unix/socket.c:1.6 src/external/bsd/bind/dist/lib/isc/unix/socket.c:1.7
--- src/external/bsd/bind/dist/lib/isc/unix/socket.c:1.6	Sun May 29 15:17:10 2011
+++ src/external/bsd/bind/dist/lib/isc/unix/socket.c	Tue Jul  5 21:59:19 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: socket.c,v 1.6 2011/05/29 15:17:10 spz Exp $	*/
+/*	$NetBSD: socket.c,v 1.7 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
- * Copyright (C) 2004-2010  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2011  Internet Systems Consortium, Inc. ("ISC")
  * Copyright (C) 1998-2003  Internet Software Consortium.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: socket.c,v 1.333.14.2 2011-02-18 04:01:16 marka Exp */
+/* Id: socket.c,v 1.333.14.2.2.1 2011-06-02 23:47:36 tbox Exp */
 
 /*! \file */
 

Index: src/external/bsd/bind/dist/lib/isc/win32/include/isc/ipv6.h
diff -u src/external/bsd/bind/dist/lib/isc/win32/include/isc/ipv6.h:1.2 src/external/bsd/bind/dist/lib/isc/win32/include/isc/ipv6.h:1.3
--- src/external/bsd/bind/dist/lib/isc/win32/include/isc/ipv6.h:1.2	Wed Feb 16 03:47:16 2011
+++ src/external/bsd/bind/dist/lib/isc/win32/include/isc/ipv6.h	Tue Jul  5 21:59:19 2011
@@ -1,7 +1,7 @@
-/*	$NetBSD: ipv6.h,v 1.2 2011/02/16 03:47:16 christos Exp $	*/
+/*	$NetBSD: ipv6.h,v 1.3 2011/07/05 21:59:19 spz Exp $	*/
 
 /*
- * Copyright (C) 2004, 2005, 2007  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2011  Internet Systems Consortium, Inc. ("ISC")
  * Copyright (C) 1999-2002  Internet Software Consortium.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Id: ipv6.h,v 1.19.814.1 2011-02-03 08:16:30 marka Exp */
+/* Id: ipv6.h,v 1.19.814.1.2.1 2011-06-02 23:47:36 tbox Exp */
 
 #ifndef ISC_IPV6_H
 #define ISC_IPV6_H 1

Reply via email to