diff options
author | Jakob Schlyter <jakob@cvs.openbsd.org> | 2006-04-05 16:44:36 +0000 |
---|---|---|
committer | Jakob Schlyter <jakob@cvs.openbsd.org> | 2006-04-05 16:44:36 +0000 |
commit | 60ec39e46f82765bb91db7c4eb62d829ccde85d4 (patch) | |
tree | 465ff43a428d5964cb6c5c9ed4ca42d439d7876e /usr.sbin/bind/lib/dns | |
parent | d13e30dc6ea34adf443ba3a467ad8b5b7735a918 (diff) |
ISC BIND release 9.3.2
Diffstat (limited to 'usr.sbin/bind/lib/dns')
-rw-r--r-- | usr.sbin/bind/lib/dns/forward.c | 13 | ||||
-rw-r--r-- | usr.sbin/bind/lib/dns/gen-unix.h | 8 | ||||
-rw-r--r-- | usr.sbin/bind/lib/dns/include/dns/forward.h | 9 | ||||
-rw-r--r-- | usr.sbin/bind/lib/dns/include/dns/masterdump.h | 6 | ||||
-rw-r--r-- | usr.sbin/bind/lib/dns/include/dns/validator.h | 10 | ||||
-rw-r--r-- | usr.sbin/bind/lib/dns/journal.c | 19 | ||||
-rw-r--r-- | usr.sbin/bind/lib/dns/key.c | 5 | ||||
-rw-r--r-- | usr.sbin/bind/lib/dns/tkey.c | 10 |
8 files changed, 55 insertions, 25 deletions
diff --git a/usr.sbin/bind/lib/dns/forward.c b/usr.sbin/bind/lib/dns/forward.c index cd762df9c7f..352451f1bf4 100644 --- a/usr.sbin/bind/lib/dns/forward.c +++ b/usr.sbin/bind/lib/dns/forward.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000, 2001 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $ISC: forward.c,v 1.5.206.1 2004/03/06 08:13:38 marka Exp $ */ +/* $ISC: forward.c,v 1.5.206.3 2005/03/17 03:58:30 marka Exp $ */ #include <config.h> @@ -139,13 +139,20 @@ isc_result_t dns_fwdtable_find(dns_fwdtable_t *fwdtable, dns_name_t *name, dns_forwarders_t **forwardersp) { + return (dns_fwdtable_find2(fwdtable, name, NULL, forwardersp)); +} + +isc_result_t +dns_fwdtable_find2(dns_fwdtable_t *fwdtable, dns_name_t *name, + dns_name_t *foundname, dns_forwarders_t **forwardersp) +{ isc_result_t result; REQUIRE(VALID_FWDTABLE(fwdtable)); RWLOCK(&fwdtable->rwlock, isc_rwlocktype_read); - result = dns_rbt_findname(fwdtable->table, name, 0, NULL, + result = dns_rbt_findname(fwdtable->table, name, 0, foundname, (void **)forwardersp); if (result == DNS_R_PARTIALMATCH) result = ISC_R_SUCCESS; diff --git a/usr.sbin/bind/lib/dns/gen-unix.h b/usr.sbin/bind/lib/dns/gen-unix.h index d384afd2f3d..7f151e8d012 100644 --- a/usr.sbin/bind/lib/dns/gen-unix.h +++ b/usr.sbin/bind/lib/dns/gen-unix.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2001 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $ISC: gen-unix.h,v 1.12.12.3 2004/03/08 09:04:29 marka Exp $ */ +/* $ISC: gen-unix.h,v 1.12.12.5 2005/06/09 23:54:29 marka Exp $ */ /* * This file is responsible for defining two operations that are not @@ -40,6 +40,10 @@ #include <isc/boolean.h> #include <isc/lang.h> +#ifdef NEED_OPTARG +extern char *optarg; +#endif + #define isc_commandline_parse getopt #define isc_commandline_argument optarg diff --git a/usr.sbin/bind/lib/dns/include/dns/forward.h b/usr.sbin/bind/lib/dns/include/dns/forward.h index 7952b617a90..b4773b9b65f 100644 --- a/usr.sbin/bind/lib/dns/include/dns/forward.h +++ b/usr.sbin/bind/lib/dns/include/dns/forward.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000, 2001 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $ISC: forward.h,v 1.2.206.1 2004/03/06 08:13:56 marka Exp $ */ +/* $ISC: forward.h,v 1.2.206.3 2005/03/17 03:58:31 marka Exp $ */ #ifndef DNS_FORWARD_H #define DNS_FORWARD_H 1 @@ -67,6 +67,10 @@ dns_fwdtable_add(dns_fwdtable_t *fwdtable, dns_name_t *name, isc_result_t dns_fwdtable_find(dns_fwdtable_t *fwdtable, dns_name_t *name, dns_forwarders_t **forwardersp); + +isc_result_t +dns_fwdtable_find2(dns_fwdtable_t *fwdtable, dns_name_t *name, + dns_name_t *foundname, dns_forwarders_t **forwardersp); /* * Finds a domain in the forwarding table. The closest matching parent * domain is returned. @@ -75,6 +79,7 @@ dns_fwdtable_find(dns_fwdtable_t *fwdtable, dns_name_t *name, * fwdtable is a valid forwarding table. * name is a valid name * forwardersp != NULL && *forwardersp == NULL + * foundname to be NULL or a valid name with buffer. * * Returns: * ISC_R_SUCCESS diff --git a/usr.sbin/bind/lib/dns/include/dns/masterdump.h b/usr.sbin/bind/lib/dns/include/dns/masterdump.h index 6d211b70c02..b33a03c1bf0 100644 --- a/usr.sbin/bind/lib/dns/include/dns/masterdump.h +++ b/usr.sbin/bind/lib/dns/include/dns/masterdump.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2002 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $ISC: masterdump.h,v 1.22.12.8 2004/03/19 05:00:49 marka Exp $ */ +/* $ISC: masterdump.h,v 1.22.12.10 2005/09/06 02:12:41 marka Exp $ */ #ifndef DNS_MASTERDUMP_H #define DNS_MASTERDUMP_H 1 @@ -122,7 +122,7 @@ LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_full; * stop of its own, but the class and type share one. */ LIBDNS_EXTERNAL_DATA extern const dns_master_style_t - dns_master_style_explicitttl; + dns_master_style_explicitttl; /* * A master style format designed for cache files. It prints explicit TTL diff --git a/usr.sbin/bind/lib/dns/include/dns/validator.h b/usr.sbin/bind/lib/dns/include/dns/validator.h index c81154cb8ae..478564ab9ef 100644 --- a/usr.sbin/bind/lib/dns/include/dns/validator.h +++ b/usr.sbin/bind/lib/dns/include/dns/validator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $ISC: validator.h,v 1.18.12.7 2004/05/14 05:06:41 marka Exp $ */ +/* $ISC: validator.h,v 1.18.12.9 2005/09/06 02:12:41 marka Exp $ */ #ifndef DNS_VALIDATOR_H #define DNS_VALIDATOR_H 1 @@ -120,12 +120,16 @@ struct dns_validator { dns_fixedname_t fname; dns_fixedname_t wild; ISC_LINK(dns_validator_t) link; - dns_rdataset_t * dlv; + dns_rdataset_t dlv; dns_fixedname_t dlvsep; isc_boolean_t havedlvsep; isc_boolean_t mustbesecure; + unsigned int dlvlabels; + unsigned int depth; }; +#define DNS_VALIDATOR_DLV 1 + ISC_LANG_BEGINDECLS isc_result_t diff --git a/usr.sbin/bind/lib/dns/journal.c b/usr.sbin/bind/lib/dns/journal.c index 77cb203c241..813f0c97b89 100644 --- a/usr.sbin/bind/lib/dns/journal.c +++ b/usr.sbin/bind/lib/dns/journal.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2002 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any @@ -15,11 +15,12 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $ISC: journal.c,v 1.77.2.1.10.9 2004/09/16 04:57:02 marka Exp $ */ +/* $ISC: journal.c,v 1.77.2.1.10.13 2005/11/03 23:08:41 marka Exp $ */ #include <config.h> #include <stdlib.h> +#include <unistd.h> #include <isc/file.h> #include <isc/mem.h> @@ -1564,7 +1565,7 @@ read_one_rr(dns_journal_t *j) { /* * Read an RR. */ - result = journal_read_rrhdr(j, &rrhdr); + CHECK(journal_read_rrhdr(j, &rrhdr)); /* * Perform a sanity check on the journal RR size. * The smallest possible RR has a 1-byte owner name @@ -1750,6 +1751,8 @@ dns_diff_subtract(dns_diff_t diff[2], dns_diff_t *r) { isc_result_t result; dns_difftuple_t *p[2]; int i, t; + isc_boolean_t append; + CHECK(dns_diff_sort(&diff[0], rdata_order)); CHECK(dns_diff_sort(&diff[1], rdata_order)); @@ -1778,11 +1781,17 @@ dns_diff_subtract(dns_diff_t diff[2], dns_diff_t *r) { } INSIST(t == 0); /* - * Identical RRs in both databases; skip them both. + * Identical RRs in both databases; skip them both + * if the ttl differs. */ + append = ISC_TF(p[0]->ttl != p[1]->ttl); for (i = 0; i < 2; i++) { ISC_LIST_UNLINK(diff[i].tuples, p[i], link); - dns_difftuple_free(&p[i]); + if (append) { + ISC_LIST_APPEND(r->tuples, p[i], link); + } else { + dns_difftuple_free(&p[i]); + } } next: ; } diff --git a/usr.sbin/bind/lib/dns/key.c b/usr.sbin/bind/lib/dns/key.c index 22599b40bb4..e251ce6e29a 100644 --- a/usr.sbin/bind/lib/dns/key.c +++ b/usr.sbin/bind/lib/dns/key.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2001 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any @@ -15,10 +15,11 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $ISC: key.c,v 1.1.4.1 2004/12/09 04:07:18 marka Exp $ */ +/* $ISC: key.c,v 1.1.4.3 2005/06/09 23:54:29 marka Exp $ */ #include <config.h> +#include <stddef.h> #include <stdlib.h> #include <isc/region.h> diff --git a/usr.sbin/bind/lib/dns/tkey.c b/usr.sbin/bind/lib/dns/tkey.c index a4470cba41b..66d8fb289d8 100644 --- a/usr.sbin/bind/lib/dns/tkey.c +++ b/usr.sbin/bind/lib/dns/tkey.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2001, 2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any @@ -16,7 +16,7 @@ */ /* - * $ISC: tkey.c,v 1.71.2.1.10.5 2004/06/11 00:30:54 marka Exp $ + * $ISC: tkey.c,v 1.71.2.1.10.7 2005/06/12 00:02:26 marka Exp $ */ #include <config.h> @@ -356,7 +356,7 @@ process_dhtkey(dns_message_t *msg, dns_name_t *signer, dns_name_t *name, isc_buffer_init(&secret, secretdata, sizeof(secretdata)); - randomdata = isc_mem_get(tctx->mctx, TKEY_RANDOM_AMOUNT); + randomdata = isc_mem_get(tkeyout->mctx, TKEY_RANDOM_AMOUNT); if (randomdata == NULL) goto failure; @@ -397,8 +397,8 @@ process_dhtkey(dns_message_t *msg, dns_name_t *signer, dns_name_t *name, isc_buffer_free(&shared); if (pubkey != NULL) dst_key_free(&pubkey); - if (randomdata == NULL) - isc_mem_put(tctx->mctx, randomdata, TKEY_RANDOM_AMOUNT); + if (randomdata != NULL) + isc_mem_put(tkeyout->mctx, randomdata, TKEY_RANDOM_AMOUNT); return (result); } |