diff --git a/bin/named/server.c b/bin/named/server.c index 4155ab8472..c3fc858ab9 100644 --- a/bin/named/server.c +++ b/bin/named/server.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: server.c,v 1.419.18.76 2010/02/26 01:03:54 marka Exp $ */ +/* $Id: server.c,v 1.419.18.77 2010/02/26 23:46:32 tbox Exp $ */ /*! \file */ diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml index d7ca6ab102..f2dce21320 100644 --- a/doc/arm/Bv9ARM-book.xml +++ b/doc/arm/Bv9ARM-book.xml @@ -2,7 +2,7 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" []> - + BIND 9 Administrator Reference Manual @@ -30,6 +30,7 @@ 2007 2008 2009 + 2010 Internet Systems Consortium, Inc. ("ISC") diff --git a/lib/dns/include/dns/rdataset.h b/lib/dns/include/dns/rdataset.h index 25f28f233a..4d3578cc49 100644 --- a/lib/dns/include/dns/rdataset.h +++ b/lib/dns/include/dns/rdataset.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2006, 2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2006, 2009, 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: rdataset.h,v 1.51.18.10 2010/02/26 01:03:56 marka Exp $ */ +/* $Id: rdataset.h,v 1.51.18.11 2010/02/26 23:46:37 tbox Exp $ */ #ifndef DNS_RDATASET_H #define DNS_RDATASET_H 1 diff --git a/lib/dns/include/dns/resolver.h b/lib/dns/include/dns/resolver.h index f1c9c147c1..5ea1d6990e 100644 --- a/lib/dns/include/dns/resolver.h +++ b/lib/dns/include/dns/resolver.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2006, 2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2006, 2009, 2010 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 @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: resolver.h,v 1.40.18.14 2010/02/26 01:03:56 marka Exp $ */ +/* $Id: resolver.h,v 1.40.18.15 2010/02/26 23:46:37 tbox Exp $ */ #ifndef DNS_RESOLVER_H #define DNS_RESOLVER_H 1 @@ -493,7 +493,7 @@ dns_resolver_setzeronosoattl(dns_resolver_t *resolver, isc_boolean_t state); void dns_resolver_addbadcache(dns_resolver_t *resolver, dns_name_t *name, - dns_rdatatype_t type, isc_time_t *expire); + dns_rdatatype_t type, isc_time_t *expire); /*%< * Add a entry to the bad cache for that will expire at 'expire'. * @@ -504,7 +504,7 @@ dns_resolver_addbadcache(dns_resolver_t *resolver, dns_name_t *name, isc_boolean_t dns_resolver_getbadcache(dns_resolver_t *resolver, dns_name_t *name, - dns_rdatatype_t type, isc_time_t *now); + dns_rdatatype_t type, isc_time_t *now); /*%< * Check to see if there is a unexpired entry in the bad cache for * . diff --git a/lib/dns/include/dns/result.h b/lib/dns/include/dns/result.h index 0c65ec6840..a43207e508 100644 --- a/lib/dns/include/dns/result.h +++ b/lib/dns/include/dns/result.h @@ -1,8 +1,8 @@ /* - * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2010 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: result.h,v 1.104.10.7 2010/02/26 01:03:56 marka Exp $ */ +/* $Id: result.h,v 1.104.10.8 2010/02/26 23:46:37 tbox Exp $ */ #ifndef DNS_RESULT_H #define DNS_RESULT_H 1 diff --git a/lib/dns/include/dns/validator.h b/lib/dns/include/dns/validator.h index 624d4334d9..befee5d66a 100644 --- a/lib/dns/include/dns/validator.h +++ b/lib/dns/include/dns/validator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007, 2009, 2010 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-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: validator.h,v 1.27.18.14 2010/02/26 01:03:56 marka Exp $ */ +/* $Id: validator.h,v 1.27.18.15 2010/02/26 23:46:37 tbox Exp $ */ #ifndef DNS_VALIDATOR_H #define DNS_VALIDATOR_H 1 diff --git a/lib/dns/ncache.c b/lib/dns/ncache.c index f41ec9abce..89106dad7c 100644 --- a/lib/dns/ncache.c +++ b/lib/dns/ncache.c @@ -1,8 +1,8 @@ /* - * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2010 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: ncache.c,v 1.36.18.4 2010/02/26 01:03:55 marka Exp $ */ +/* $Id: ncache.c,v 1.36.18.5 2010/02/26 23:46:36 tbox Exp $ */ /*! \file */ diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 9edd1ab18e..fb561db3cf 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.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: rbtdb.c,v 1.196.18.60 2010/02/26 01:03:55 marka Exp $ */ +/* $Id: rbtdb.c,v 1.196.18.61 2010/02/26 23:46:36 tbox Exp $ */ /*! \file */ @@ -5851,8 +5851,8 @@ rdataset_expire(dns_rdataset_t *rdataset) { NODE_LOCK(&rbtdb->node_locks[rbtnode->locknum].lock, isc_rwlocktype_write); header->ttl = 0; - header->attributes |= RDATASET_ATTR_STALE; - rbtnode->dirty = 1; + header->attributes |= RDATASET_ATTR_STALE; + rbtnode->dirty = 1; NODE_UNLOCK(&rbtdb->node_locks[rbtnode->locknum].lock, isc_rwlocktype_write); } diff --git a/lib/dns/rdatalist.c b/lib/dns/rdatalist.c index 7fc45ef215..b2c08123e3 100644 --- a/lib/dns/rdatalist.c +++ b/lib/dns/rdatalist.c @@ -1,8 +1,8 @@ /* - * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2010 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2001, 2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdatalist.c,v 1.28.18.4 2010/02/26 01:03:55 marka Exp $ */ +/* $Id: rdatalist.c,v 1.28.18.5 2010/02/26 23:46:36 tbox Exp $ */ /*! \file */ diff --git a/lib/dns/rdataset.c b/lib/dns/rdataset.c index 8a78f18f51..56a386a9b5 100644 --- a/lib/dns/rdataset.c +++ b/lib/dns/rdataset.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2006, 2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2006, 2009, 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: rdataset.c,v 1.72.18.8 2010/02/26 01:03:55 marka Exp $ */ +/* $Id: rdataset.c,v 1.72.18.9 2010/02/26 23:46:36 tbox Exp $ */ /*! \file */ diff --git a/lib/dns/rdataslab.c b/lib/dns/rdataslab.c index bfec38e553..fb5a4b786d 100644 --- a/lib/dns/rdataslab.c +++ b/lib/dns/rdataslab.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) 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: rdataslab.c,v 1.35.18.11 2010/02/26 01:03:55 marka Exp $ */ +/* $Id: rdataslab.c,v 1.35.18.12 2010/02/26 23:46:36 tbox Exp $ */ /*! \file */ diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 05272da45e..95c7bd4a4f 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: resolver.c,v 1.284.18.100 2010/02/26 01:03:55 marka Exp $ */ +/* $Id: resolver.c,v 1.284.18.101 2010/02/26 23:46:36 tbox Exp $ */ /*! \file */ @@ -373,13 +373,13 @@ struct dns_resolver { unsigned int activebuckets; isc_boolean_t priming; unsigned int spillat; /* clients-per-query */ - - /* Bad cache. */ - dns_badcache_t ** badcache; - unsigned int badcount; - unsigned int badhash; - unsigned int badsweep; - + + /* Bad cache. */ + dns_badcache_t ** badcache; + unsigned int badcount; + unsigned int badhash; + unsigned int badsweep; + /* Locked by primelock. */ dns_fetch_t * primefetch; /* Locked by nlock. */ @@ -3818,50 +3818,50 @@ validated(isc_task_t *task, isc_event_t *event) { FCTXTRACE("validation failed"); fctx->valfail++; fctx->vresult = vevent->result; - if (fctx->vresult != DNS_R_BROKENCHAIN) { - result = ISC_R_NOTFOUND; - if (vevent->rdataset != NULL) - result = dns_db_findnode(fctx->cache, - vevent->name, - ISC_TRUE, &node); - if (result == ISC_R_SUCCESS) - (void)dns_db_deleterdataset(fctx->cache, node, - NULL, - vevent->type, 0); - if (result == ISC_R_SUCCESS && - vevent->sigrdataset != NULL) - (void)dns_db_deleterdataset(fctx->cache, node, - NULL, - dns_rdatatype_rrsig, - vevent->type); - if (result == ISC_R_SUCCESS) - dns_db_detachnode(fctx->cache, &node); - } - if (fctx->vresult == DNS_R_BROKENCHAIN && !negative) { - /* - * Cache the data as pending for later validation. - */ - result = ISC_R_NOTFOUND; - if (vevent->rdataset != NULL) - result = dns_db_findnode(fctx->cache, - vevent->name, - ISC_TRUE, &node); - if (result == ISC_R_SUCCESS) { - (void)dns_db_addrdataset(fctx->cache, node, - NULL, now, - vevent->rdataset, 0, - NULL); - } - if (result == ISC_R_SUCCESS && - vevent->sigrdataset != NULL) - (void)dns_db_addrdataset(fctx->cache, node, - NULL, now, - vevent->sigrdataset, - 0, NULL); - if (result == ISC_R_SUCCESS) - dns_db_detachnode(fctx->cache, &node); - } - result = fctx->vresult; + if (fctx->vresult != DNS_R_BROKENCHAIN) { + result = ISC_R_NOTFOUND; + if (vevent->rdataset != NULL) + result = dns_db_findnode(fctx->cache, + vevent->name, + ISC_TRUE, &node); + if (result == ISC_R_SUCCESS) + (void)dns_db_deleterdataset(fctx->cache, node, + NULL, + vevent->type, 0); + if (result == ISC_R_SUCCESS && + vevent->sigrdataset != NULL) + (void)dns_db_deleterdataset(fctx->cache, node, + NULL, + dns_rdatatype_rrsig, + vevent->type); + if (result == ISC_R_SUCCESS) + dns_db_detachnode(fctx->cache, &node); + } + if (fctx->vresult == DNS_R_BROKENCHAIN && !negative) { + /* + * Cache the data as pending for later validation. + */ + result = ISC_R_NOTFOUND; + if (vevent->rdataset != NULL) + result = dns_db_findnode(fctx->cache, + vevent->name, + ISC_TRUE, &node); + if (result == ISC_R_SUCCESS) { + (void)dns_db_addrdataset(fctx->cache, node, + NULL, now, + vevent->rdataset, 0, + NULL); + } + if (result == ISC_R_SUCCESS && + vevent->sigrdataset != NULL) + (void)dns_db_addrdataset(fctx->cache, node, + NULL, now, + vevent->sigrdataset, + 0, NULL); + if (result == ISC_R_SUCCESS) + dns_db_detachnode(fctx->cache, &node); + } + result = fctx->vresult; add_bad(fctx, addrinfo, result, badns_validation); isc_event_free(&event); UNLOCK(&fctx->res->buckets[fctx->bucketnum].lock); @@ -3871,23 +3871,23 @@ validated(isc_task_t *task, isc_event_t *event) { dns_validator_send(fctx->validator); else if (sentresponse) fctx_done(fctx, result, __LINE__); /* Locks bucket. */ - else if (result == DNS_R_BROKENCHAIN) { - isc_result_t tresult; - isc_time_t expire; - isc_interval_t i; - - isc_interval_set(&i, DNS_BADCACHE_TTL(fctx), 0); - tresult = isc_time_nowplusinterval(&expire, &i); - if (negative && - (fctx->type == dns_rdatatype_dnskey || - fctx->type == dns_rdatatype_dlv || - fctx->type == dns_rdatatype_ds) && - tresult == ISC_R_SUCCESS) - dns_resolver_addbadcache(fctx->res, - &fctx->name, - fctx->type, &expire); - fctx_done(fctx, result, __LINE__); /* Locks bucket. */ - } else + else if (result == DNS_R_BROKENCHAIN) { + isc_result_t tresult; + isc_time_t expire; + isc_interval_t i; + + isc_interval_set(&i, DNS_BADCACHE_TTL(fctx), 0); + tresult = isc_time_nowplusinterval(&expire, &i); + if (negative && + (fctx->type == dns_rdatatype_dnskey || + fctx->type == dns_rdatatype_dlv || + fctx->type == dns_rdatatype_ds) && + tresult == ISC_R_SUCCESS) + dns_resolver_addbadcache(fctx->res, + &fctx->name, + fctx->type, &expire); + fctx_done(fctx, result, __LINE__); /* Locks bucket. */ + } else fctx_try(fctx, ISC_TRUE); /* Locks bucket. */ return; } @@ -7517,7 +7517,7 @@ dns_resolver_flushbadcache(dns_resolver_t *resolver, dns_name_t *name) { } else prev = bad; } - } else + } else destroy_badcache(resolver); unlock: diff --git a/lib/dns/result.c b/lib/dns/result.c index 02385bca3b..504de7ebbf 100644 --- a/lib/dns/result.c +++ b/lib/dns/result.c @@ -1,8 +1,8 @@ /* - * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2010 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: result.c,v 1.115.10.8 2010/02/26 01:03:56 marka Exp $ */ +/* $Id: result.c,v 1.115.10.9 2010/02/26 23:46:37 tbox Exp $ */ /*! \file */ diff --git a/lib/dns/sdb.c b/lib/dns/sdb.c index 6e77b55de5..42a1ce3640 100644 --- a/lib/dns/sdb.c +++ b/lib/dns/sdb.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) 2000, 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: sdb.c,v 1.45.18.20 2010/02/26 01:03:56 marka Exp $ */ +/* $Id: sdb.c,v 1.45.18.21 2010/02/26 23:46:37 tbox Exp $ */ /*! \file */ diff --git a/lib/dns/sdlz.c b/lib/dns/sdlz.c index 97df6261b7..9dcaa57e33 100644 --- a/lib/dns/sdlz.c +++ b/lib/dns/sdlz.c @@ -1,5 +1,5 @@ /* - * Portions Copyright (C) 2005-2007, 2009 Internet Systems Consortium, Inc. ("ISC") + * Portions Copyright (C) 2005-2007, 2009, 2010 Internet Systems Consortium, Inc. ("ISC") * Portions Copyright (C) 1999-2001 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -50,7 +50,7 @@ * USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: sdlz.c,v 1.2.2.15 2010/02/26 01:03:56 marka Exp $ */ +/* $Id: sdlz.c,v 1.2.2.16 2010/02/26 23:46:37 tbox Exp $ */ /*! \file */ diff --git a/lib/dns/validator.c b/lib/dns/validator.c index dfca926b77..9642791ad1 100644 --- a/lib/dns/validator.c +++ b/lib/dns/validator.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) 2000-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: validator.c,v 1.119.18.52 2010/02/26 01:03:56 marka Exp $ */ +/* $Id: validator.c,v 1.119.18.53 2010/02/26 23:46:37 tbox Exp $ */ /*! \file */ @@ -2626,24 +2626,24 @@ finddlvsep(dns_validator_t *val, isc_boolean_t resume) { namebuf); result = view_find(val, dlvname, dns_rdatatype_dlv); if (result == ISC_R_SUCCESS) { - if (DNS_TRUST_PENDING(val->frdataset.trust) && - dns_rdataset_isassociated(&val->fsigrdataset)) - { - dns_fixedname_init(&val->fname); - dns_name_copy(dlvname, - dns_fixedname_name(&val->fname), - NULL); - result = create_validator(val, - dns_fixedname_name(&val->fname), - dns_rdatatype_dlv, - &val->frdataset, - &val->fsigrdataset, - dlvvalidated, - "finddlvsep"); - if (result != ISC_R_SUCCESS) - return (result); - return (DNS_R_WAIT); - } + if (DNS_TRUST_PENDING(val->frdataset.trust) && + dns_rdataset_isassociated(&val->fsigrdataset)) + { + dns_fixedname_init(&val->fname); + dns_name_copy(dlvname, + dns_fixedname_name(&val->fname), + NULL); + result = create_validator(val, + dns_fixedname_name(&val->fname), + dns_rdatatype_dlv, + &val->frdataset, + &val->fsigrdataset, + dlvvalidated, + "finddlvsep"); + if (result != ISC_R_SUCCESS) + return (result); + return (DNS_R_WAIT); + } if (val->frdataset.trust < dns_trust_secure) return (DNS_R_NOVALIDSIG); val->havedlvsep = ISC_TRUE; diff --git a/lib/dns/view.c b/lib/dns/view.c index 2d61043be4..801654be36 100644 --- a/lib/dns/view.c +++ b/lib/dns/view.c @@ -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: view.c,v 1.126.18.17 2010/02/26 01:03:56 marka Exp $ */ +/* $Id: view.c,v 1.126.18.18 2010/02/26 23:46:37 tbox Exp $ */ /*! \file */