summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorInternet Software Consortium, Inc <@isc.org>2009-12-26 18:04:05 -0700
committerInternet Software Consortium, Inc <@isc.org>2009-12-26 18:04:05 -0700
commit2d27fb027f207bdec109fad8c9c65f9d6278b3db (patch)
tree114b1faecb63eeee27fb44da040d619cac686d72 /lib
parent76d4794687ff55c501dc8f09f200494ef1ac429d (diff)
downloadbind9-2d27fb027f207bdec109fad8c9c65f9d6278b3db.tar.gz
9.7.0rc1
Diffstat (limited to 'lib')
-rw-r--r--lib/bind9/Makefile.in4
-rw-r--r--lib/bind9/api2
-rw-r--r--lib/bind9/check.c7
-rw-r--r--lib/dns/Makefile.in5
-rw-r--r--lib/dns/api2
-rw-r--r--lib/dns/diff.c9
-rw-r--r--lib/dns/dispatch.c28
-rw-r--r--lib/dns/dnssec.c4
-rw-r--r--lib/dns/gen.c6
-rw-r--r--lib/dns/include/dns/db.h23
-rw-r--r--lib/dns/include/dns/keytable.h26
-rw-r--r--lib/dns/include/dns/rdata.h21
-rw-r--r--lib/dns/include/dns/view.h5
-rw-r--r--lib/dns/include/dns/zone.h27
-rw-r--r--lib/dns/keytable.c39
-rw-r--r--lib/dns/nsec3.c3
-rw-r--r--lib/dns/rbtdb.c16
-rw-r--r--lib/dns/rdata.c33
-rw-r--r--lib/dns/rdata/any_255/tsig_250.c9
-rw-r--r--lib/dns/rdata/ch_3/a_1.c12
-rw-r--r--lib/dns/rdata/generic/afsdb_18.c8
-rw-r--r--lib/dns/rdata/generic/cert_37.c10
-rw-r--r--lib/dns/rdata/generic/cname_5.c9
-rw-r--r--lib/dns/rdata/generic/dlv_32769.c13
-rw-r--r--lib/dns/rdata/generic/dname_39.c8
-rw-r--r--lib/dns/rdata/generic/dnskey_48.c41
-rw-r--r--lib/dns/rdata/generic/ds_43.c9
-rw-r--r--lib/dns/rdata/generic/gpos_27.c9
-rw-r--r--lib/dns/rdata/generic/hinfo_13.c8
-rw-r--r--lib/dns/rdata/generic/hip_55.c60
-rw-r--r--lib/dns/rdata/generic/ipseckey_45.c41
-rw-r--r--lib/dns/rdata/generic/isdn_20.c9
-rw-r--r--lib/dns/rdata/generic/key_25.c37
-rw-r--r--lib/dns/rdata/generic/keydata_65533.c7
-rw-r--r--lib/dns/rdata/generic/loc_29.c7
-rw-r--r--lib/dns/rdata/generic/mb_7.c15
-rw-r--r--lib/dns/rdata/generic/md_3.c15
-rw-r--r--lib/dns/rdata/generic/mf_4.c15
-rw-r--r--lib/dns/rdata/generic/mg_8.c15
-rw-r--r--lib/dns/rdata/generic/minfo_14.c21
-rw-r--r--lib/dns/rdata/generic/mr_9.c15
-rw-r--r--lib/dns/rdata/generic/mx_15.c13
-rw-r--r--lib/dns/rdata/generic/ns_2.c15
-rw-r--r--lib/dns/rdata/generic/nsec3_50.c7
-rw-r--r--lib/dns/rdata/generic/nsec3param_51.c7
-rw-r--r--lib/dns/rdata/generic/nsec_47.c36
-rw-r--r--lib/dns/rdata/generic/null_10.c9
-rw-r--r--lib/dns/rdata/generic/nxt_30.c8
-rw-r--r--lib/dns/rdata/generic/opt_41.c9
-rw-r--r--lib/dns/rdata/generic/proforma.c21
-rw-r--r--lib/dns/rdata/generic/ptr_12.c14
-rw-r--r--lib/dns/rdata/generic/rp_17.c20
-rw-r--r--lib/dns/rdata/generic/rrsig_46.c47
-rw-r--r--lib/dns/rdata/generic/rt_21.c13
-rw-r--r--lib/dns/rdata/generic/sig_24.c8
-rw-r--r--lib/dns/rdata/generic/soa_6.c7
-rw-r--r--lib/dns/rdata/generic/spf_99.c8
-rw-r--r--lib/dns/rdata/generic/sshfp_44.c9
-rw-r--r--lib/dns/rdata/generic/tkey_249.c8
-rw-r--r--lib/dns/rdata/generic/txt_16.c9
-rw-r--r--lib/dns/rdata/generic/unspec_103.c9
-rw-r--r--lib/dns/rdata/generic/x25_19.c9
-rw-r--r--lib/dns/rdata/hs_4/a_1.c9
-rw-r--r--lib/dns/rdata/in_1/a6_38.c9
-rw-r--r--lib/dns/rdata/in_1/a_1.c9
-rw-r--r--lib/dns/rdata/in_1/aaaa_28.c8
-rw-r--r--lib/dns/rdata/in_1/apl_42.c9
-rw-r--r--lib/dns/rdata/in_1/dhcid_49.c11
-rw-r--r--lib/dns/rdata/in_1/kx_36.c13
-rw-r--r--lib/dns/rdata/in_1/naptr_35.c7
-rw-r--r--lib/dns/rdata/in_1/nsap-ptr_23.c15
-rw-r--r--lib/dns/rdata/in_1/nsap_22.c9
-rw-r--r--lib/dns/rdata/in_1/px_26.c13
-rw-r--r--lib/dns/rdata/in_1/srv_33.c13
-rw-r--r--lib/dns/rdata/in_1/wks_11.c7
-rw-r--r--lib/dns/view.c5
-rw-r--r--lib/dns/win32/libdns.def7
-rw-r--r--lib/dns/zone.c283
-rw-r--r--lib/export/dns/Makefile.in5
-rw-r--r--lib/export/irs/Makefile.in5
-rw-r--r--lib/export/isc/Makefile.in6
-rw-r--r--lib/export/isc/include/isc/Makefile.in9
-rw-r--r--lib/export/isc/include/isc/bind9.h30
-rw-r--r--lib/export/isccfg/Makefile.in6
-rw-r--r--lib/export/samples/Makefile.in4
-rw-r--r--lib/isc/Makefile.in4
-rw-r--r--lib/isc/api2
-rw-r--r--lib/isc/include/isc/Makefile.in10
-rw-r--r--lib/isc/include/isc/bind9.h30
-rw-r--r--lib/isc/include/isc/types.h3
-rw-r--r--lib/isc/nls/Makefile.in4
-rw-r--r--lib/isc/nothreads/Makefile.in4
-rw-r--r--lib/isc/pthreads/Makefile.in4
-rw-r--r--lib/isc/unix/Makefile.in4
-rw-r--r--lib/isc/win32/Makefile.in4
-rw-r--r--lib/isccc/Makefile.in4
-rw-r--r--lib/isccfg/Makefile.in4
-rw-r--r--lib/isccfg/api2
-rw-r--r--lib/isccfg/namedconf.c14
-rw-r--r--lib/tests/Makefile.in4
100 files changed, 1242 insertions, 286 deletions
diff --git a/lib/bind9/Makefile.in b/lib/bind9/Makefile.in
index 91e20836..35c40223 100644
--- a/lib/bind9/Makefile.in
+++ b/lib/bind9/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.13 2009/09/02 23:48:01 tbox Exp $
+# $Id: Makefile.in,v 1.14 2009/12/05 23:31:40 each Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -28,7 +28,7 @@ top_srcdir = @top_srcdir@
CINCLUDES = -I. ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISC_INCLUDES} \
${ISCCFG_INCLUDES}
-CDEFINES = -DBIND9
+CDEFINES =
CWARNINGS =
ISCLIBS = ../../lib/isc/libisc.@A@
diff --git a/lib/bind9/api b/lib/bind9/api
index 3252b3bf..25708f02 100644
--- a/lib/bind9/api
+++ b/lib/bind9/api
@@ -1,3 +1,3 @@
LIBINTERFACE = 60
-LIBREVISION = 0
+LIBREVISION = 1
LIBAGE = 0
diff --git a/lib/bind9/check.c b/lib/bind9/check.c
index db360e2b..785f5831 100644
--- a/lib/bind9/check.c
+++ b/lib/bind9/check.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: check.c,v 1.112 2009/10/12 23:48:01 tbox Exp $ */
+/* $Id: check.c,v 1.114 2009/12/04 21:09:33 marka Exp $ */
/*! \file */
@@ -1101,7 +1101,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
{ "min-retry-time", SLAVEZONE | STUBZONE },
{ "max-refresh-time", SLAVEZONE | STUBZONE },
{ "min-refresh-time", SLAVEZONE | STUBZONE },
- { "secure-to-insecure", MASTERZONE },
+ { "dnssec-secure-to-insecure", MASTERZONE },
{ "sig-validity-interval", MASTERZONE },
{ "sig-re-signing-interval", MASTERZONE },
{ "sig-signing-nodes", MASTERZONE },
@@ -1121,12 +1121,13 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
{ "key-directory", MASTERZONE },
{ "check-wildcard", MASTERZONE },
{ "check-mx", MASTERZONE },
+ { "check-dup-records", MASTERZONE },
{ "integrity-check", MASTERZONE },
{ "check-mx-cname", MASTERZONE },
{ "check-srv-cname", MASTERZONE },
{ "masterfile-format", MASTERZONE | SLAVEZONE | STUBZONE | HINTZONE },
{ "update-check-ksk", MASTERZONE },
- { "dnskey-ksk-only", MASTERZONE },
+ { "dnssec-dnskey-kskonly", MASTERZONE },
{ "auto-dnssec", MASTERZONE },
{ "try-tcp-refresh", SLAVEZONE },
};
diff --git a/lib/dns/Makefile.in b/lib/dns/Makefile.in
index 548b32ed..2290ab40 100644
--- a/lib/dns/Makefile.in
+++ b/lib/dns/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.168 2009/10/08 23:13:06 marka Exp $
+# $Id: Makefile.in,v 1.169 2009/12/05 23:31:40 each Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -34,8 +34,7 @@ USE_ISC_SPNEGO = @USE_ISC_SPNEGO@
CINCLUDES = -I. -Iinclude ${DNS_INCLUDES} \
${ISC_INCLUDES} @DST_OPENSSL_INC@ @DST_GSSAPI_INC@
-CDEFINES = -DBIND9 -DUSE_MD5 @USE_OPENSSL@ @USE_GSSAPI@ \
- ${USE_ISC_SPNEGO}
+CDEFINES = -DUSE_MD5 @USE_OPENSSL@ @USE_GSSAPI@ ${USE_ISC_SPNEGO}
CWARNINGS =
diff --git a/lib/dns/api b/lib/dns/api
index ddd8d2fd..5609cd0c 100644
--- a/lib/dns/api
+++ b/lib/dns/api
@@ -1,3 +1,3 @@
-LIBINTERFACE = 62
+LIBINTERFACE = 63
LIBREVISION = 0
LIBAGE = 0
diff --git a/lib/dns/diff.c b/lib/dns/diff.c
index a64da709..32f9a69b 100644
--- a/lib/dns/diff.c
+++ b/lib/dns/diff.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: diff.c,v 1.21 2009/04/30 06:53:10 marka Exp $ */
+/* $Id: diff.c,v 1.23 2009/12/01 00:47:09 each Exp $ */
/*! \file */
@@ -399,9 +399,9 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver,
sizeof(classbuf));
isc_log_write(DIFF_COMMON_LOGARGS,
ISC_LOG_WARNING,
- "%s/%s: update with no "
- " effect", namebuf,
- classbuf);
+ "%s/%s: dns_diff_apply: "
+ "update with no effect",
+ namebuf, classbuf);
}
} else if (result == DNS_R_NXRRSET) {
/*
@@ -490,6 +490,7 @@ dns_diff_load(dns_diff_t *diff, dns_addrdatasetfunc_t addfunc,
if (result == DNS_R_UNCHANGED) {
isc_log_write(DIFF_COMMON_LOGARGS,
ISC_LOG_WARNING,
+ "dns_diff_load: "
"update with no effect");
} else if (result == ISC_R_SUCCESS ||
result == DNS_R_NXRRSET) {
diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c
index e1323055..1d65ce43 100644
--- a/lib/dns/dispatch.c
+++ b/lib/dns/dispatch.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dispatch.c,v 1.164 2009/09/01 00:22:26 jinmei Exp $ */
+/* $Id: dispatch.c,v 1.168 2009/12/02 23:15:14 marka Exp $ */
/*! \file */
@@ -778,13 +778,19 @@ new_portentry(dns_dispatch_t *disp, in_port_t port) {
return (portentry);
}
+/*%
+ * The caller must not hold the qid->lock.
+ */
static void
deref_portentry(dns_dispatch_t *disp, dispportentry_t **portentryp) {
dispportentry_t *portentry = *portentryp;
+ dns_qid_t *qid;
REQUIRE(disp->port_table != NULL);
REQUIRE(portentry != NULL && portentry->refs > 0);
+ qid = DNS_QID(disp);
+ LOCK(&qid->lock);
portentry->refs--;
if (portentry->refs == 0) {
ISC_LIST_UNLINK(disp->port_table[portentry->port %
@@ -794,6 +800,7 @@ deref_portentry(dns_dispatch_t *disp, dispportentry_t **portentryp) {
}
*portentryp = NULL;
+ UNLOCK(&qid->lock);
}
/*%
@@ -811,8 +818,9 @@ socket_search(dns_qid_t *qid, isc_sockaddr_t *dest, in_port_t port,
dispsock = ISC_LIST_HEAD(qid->sock_table[bucket]);
while (dispsock != NULL) {
- if (isc_sockaddr_equal(dest, &dispsock->host) &&
- dispsock->portentry->port == port)
+ if (dispsock->portentry != NULL &&
+ dispsock->portentry->port == port &&
+ isc_sockaddr_equal(dest, &dispsock->host))
return (dispsock);
dispsock = ISC_LIST_NEXT(dispsock, blink);
}
@@ -2103,8 +2111,18 @@ dns_dispatchmgr_setudp(dns_dispatchmgr_t *mgr,
/* Create or adjust buffer pool */
if (mgr->bpool != NULL) {
- isc_mempool_setmaxalloc(mgr->bpool, maxbuffers);
- mgr->maxbuffers = maxbuffers;
+ /*
+ * We only increase the maxbuffers to avoid accidental buffer
+ * shortage. Ideally we'd separate the manager-wide maximum
+ * from per-dispatch limits and respect the latter within the
+ * global limit. But at this moment that's deemed to be
+ * overkilling and isn't worth additional implementation
+ * complexity.
+ */
+ if (maxbuffers > mgr->maxbuffers) {
+ isc_mempool_setmaxalloc(mgr->bpool, maxbuffers);
+ mgr->maxbuffers = maxbuffers;
+ }
} else {
result = isc_mempool_create(mgr->mctx, buffersize, &mgr->bpool);
if (result != ISC_R_SUCCESS) {
diff --git a/lib/dns/dnssec.c b/lib/dns/dnssec.c
index 9e0b6514..d71a05a5 100644
--- a/lib/dns/dnssec.c
+++ b/lib/dns/dnssec.c
@@ -16,7 +16,7 @@
*/
/*
- * $Id: dnssec.c,v 1.114 2009/11/24 03:42:32 each Exp $
+ * $Id: dnssec.c,v 1.115 2009/11/24 23:48:12 tbox Exp $
*/
/*! \file */
@@ -656,7 +656,7 @@ dns_dnssec_findzonekeys2(dns_db_t *db, dns_dbversion_t *ver,
mctx, &keys[count]);
if (result == ISC_R_SUCCESS &&
dst_key_pubcompare(pubkey, keys[count],
- ISC_FALSE)) {
+ ISC_FALSE)) {
dst_key_setflags(keys[count], flags);
}
dst_key_setflags(pubkey, flags);
diff --git a/lib/dns/gen.c b/lib/dns/gen.c
index ede8bc09..a0b4df37 100644
--- a/lib/dns/gen.c
+++ b/lib/dns/gen.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-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: gen.c,v 1.83 2008/09/25 04:02:38 tbox Exp $ */
+/* $Id: gen.c,v 1.85 2009/12/04 22:06:37 tbox Exp $ */
/*! \file */
@@ -631,6 +631,8 @@ main(int argc, char **argv) {
TOWIRETYPE, TOWIRECLASS, TOWIREDEF);
doswitch("COMPARESWITCH", "compare", COMPAREARGS,
COMPARETYPE, COMPARECLASS, COMPAREDEF);
+ doswitch("CASECOMPARESWITCH", "casecompare", COMPAREARGS,
+ COMPARETYPE, COMPARECLASS, COMPAREDEF);
doswitch("FROMSTRUCTSWITCH", "fromstruct", FROMSTRUCTARGS,
FROMSTRUCTTYPE, FROMSTRUCTCLASS, FROMSTRUCTDEF);
doswitch("TOSTRUCTSWITCH", "tostruct", TOSTRUCTARGS,
diff --git a/lib/dns/include/dns/db.h b/lib/dns/include/dns/db.h
index e3b0e550..234f7b5e 100644
--- a/lib/dns/include/dns/db.h
+++ b/lib/dns/include/dns/db.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: db.h,v 1.100 2009/07/19 23:47:55 tbox Exp $ */
+/* $Id: db.h,v 1.102 2009/11/25 23:49:22 tbox Exp $ */
#ifndef DNS_DB_H
#define DNS_DB_H 1
@@ -208,14 +208,15 @@ struct dns_db {
/*%
* Options that can be specified for dns_db_find().
*/
-#define DNS_DBFIND_GLUEOK 0x01
-#define DNS_DBFIND_VALIDATEGLUE 0x02
-#define DNS_DBFIND_NOWILD 0x04
-#define DNS_DBFIND_PENDINGOK 0x08
-#define DNS_DBFIND_NOEXACT 0x10
-#define DNS_DBFIND_FORCENSEC 0x20
-#define DNS_DBFIND_COVERINGNSEC 0x40
-#define DNS_DBFIND_FORCENSEC3 0x80
+#define DNS_DBFIND_GLUEOK 0x0001
+#define DNS_DBFIND_VALIDATEGLUE 0x0002
+#define DNS_DBFIND_NOWILD 0x0004
+#define DNS_DBFIND_PENDINGOK 0x0008
+#define DNS_DBFIND_NOEXACT 0x0010
+#define DNS_DBFIND_FORCENSEC 0x0020
+#define DNS_DBFIND_COVERINGNSEC 0x0040
+#define DNS_DBFIND_FORCENSEC3 0x0080
+#define DNS_DBFIND_ADDITIONALOK 0x0100
/*@}*/
/*@{*/
@@ -701,6 +702,10 @@ dns_db_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
* For cache databases, glue is any rdataset with a trust of
* dns_trust_glue.
*
+ * \li If 'options' does not have #DNS_DBFIND_ADDITIONALOK set, then no
+ * additional records will be returned. Only caches can have
+ * rdataset with trust dns_trust_additional.
+ *
* \li If 'options' does not have #DNS_DBFIND_PENDINGOK set, then no
* pending data will be returned. This option is only meaningful for
* cache databases.
diff --git a/lib/dns/include/dns/keytable.h b/lib/dns/include/dns/keytable.h
index 97f8bbe9..a9703f4a 100644
--- a/lib/dns/include/dns/keytable.h
+++ b/lib/dns/include/dns/keytable.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: keytable.h,v 1.18 2009/07/01 23:47:36 tbox Exp $ */
+/* $Id: keytable.h,v 1.20 2009/12/03 16:49:09 each Exp $ */
#ifndef DNS_KEYTABLE_H
#define DNS_KEYTABLE_H 1
@@ -351,6 +351,22 @@ dns_keytable_finddeepestmatch(dns_keytable_t *keytable, dns_name_t *name,
*/
void
+dns_keytable_attachkeynode(dns_keytable_t *keytable, dns_keynode_t *source,
+ dns_keynode_t **target);
+/*%<
+ * Attach a keynode and and increment the active_nodes counter in a
+ * corresponding keytable.
+ *
+ * Requires:
+ *
+ *\li 'keytable' is a valid keytable.
+ *
+ *\li 'source' is a valid keynode.
+ *
+ *\li 'target' is not null and '*target' is null.
+ */
+
+void
dns_keytable_detachkeynode(dns_keytable_t *keytable,
dns_keynode_t **keynodep);
/*%<
@@ -421,9 +437,15 @@ dns_keynode_attach(dns_keynode_t *source, dns_keynode_t **target);
void
dns_keynode_detach(isc_mem_t *mctx, dns_keynode_t **target);
/*%<
- * Detach keynode.
+ * Detach a single keynode, without touching any keynodes that
+ * may be pointed to by its 'next' pointer
*/
+void
+dns_keynode_detachall(isc_mem_t *mctx, dns_keynode_t **target);
+/*%<
+ * Detach a keynode and all its succesors.
+ */
ISC_LANG_ENDDECLS
#endif /* DNS_KEYTABLE_H */
diff --git a/lib/dns/include/dns/rdata.h b/lib/dns/include/dns/rdata.h
index 328ad5ea..76bfedcd 100644
--- a/lib/dns/include/dns/rdata.h
+++ b/lib/dns/include/dns/rdata.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdata.h,v 1.76 2009/10/08 23:48:10 tbox Exp $ */
+/* $Id: rdata.h,v 1.77 2009/12/04 21:09:33 marka Exp $ */
#ifndef DNS_RDATA_H
#define DNS_RDATA_H 1
@@ -220,6 +220,25 @@ dns_rdata_compare(const dns_rdata_t *rdata1, const dns_rdata_t *rdata2);
*\li > 0 'rdata1' is greater than 'rdata2'
*/
+int
+dns_rdata_casecompare(const dns_rdata_t *rdata1, const dns_rdata_t *rdata2);
+/*%<
+ * dns_rdata_casecompare() is similar to dns_rdata_compare() but also
+ * compares domain names case insensitively in known rdata types that
+ * are treated as opaque data by dns_rdata_compare().
+ *
+ * Requires:
+ *
+ *\li 'rdata1' is a valid, non-empty rdata
+ *
+ *\li 'rdata2' is a valid, non-empty rdata
+ *
+ * Returns:
+ *\li < 0 'rdata1' is less than 'rdata2'
+ *\li 0 'rdata1' is equal to 'rdata2'
+ *\li > 0 'rdata1' is greater than 'rdata2'
+ */
+
/***
*** Conversions
***/
diff --git a/lib/dns/include/dns/view.h b/lib/dns/include/dns/view.h
index b29d7ba1..ab369ef4 100644
--- a/lib/dns/include/dns/view.h
+++ b/lib/dns/include/dns/view.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: view.h,v 1.119 2009/10/27 22:46:13 each Exp $ */
+/* $Id: view.h,v 1.120 2009/11/28 15:57:37 vjs Exp $ */
#ifndef DNS_VIEW_H
#define DNS_VIEW_H 1
@@ -153,6 +153,9 @@ struct dns_view {
dns_name_t * dlv;
dns_fixedname_t dlv_fixed;
isc_uint16_t maxudp;
+#ifdef ALLOW_FILTER_AAAA_ON_V4
+ dns_v4_aaaa_t v4_aaaa;
+#endif
/*
* Configurable data for server use only,
diff --git a/lib/dns/include/dns/zone.h b/lib/dns/include/dns/zone.h
index 9dae4d7e..ed794899 100644
--- a/lib/dns/include/dns/zone.h
+++ b/lib/dns/include/dns/zone.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zone.h,v 1.170 2009/10/12 20:48:12 each Exp $ */
+/* $Id: zone.h,v 1.174 2009/12/04 22:06:37 tbox Exp $ */
#ifndef DNS_ZONE_H
#define DNS_ZONE_H 1
@@ -71,8 +71,10 @@ typedef enum {
#define DNS_ZONEOPT_TRYTCPREFRESH 0x01000000U /*%< try tcp refresh on udp failure */
#define DNS_ZONEOPT_NOTIFYTOSOA 0x02000000U /*%< Notify the SOA MNAME */
#define DNS_ZONEOPT_NSEC3TESTZONE 0x04000000U /*%< nsec3-test-zone */
-#define DNS_ZONEOPT_SECURETOINSECURE 0x08000000U /*%< secure-to-insecure */
-#define DNS_ZONEOPT_DNSKEYKSKONLY 0x10000000U /*%< dnskey-ksk-only */
+#define DNS_ZONEOPT_SECURETOINSECURE 0x08000000U /*%< dnssec-secure-to-insecure */
+#define DNS_ZONEOPT_DNSKEYKSKONLY 0x10000000U /*%< dnssec-dnskey-kskonly */
+#define DNS_ZONEOPT_CHECKDUPRR 0x20000000U /*%< check-dup-records */
+#define DNS_ZONEOPT_CHECKDUPRRFAIL 0x40000000U /*%< fatal check-dup-records failures */
#ifndef NOMINUM_PUBLIC
/*
@@ -1782,6 +1784,25 @@ dns_zone_rekey(dns_zone_t *zone);
* Update the zone's DNSKEY set from the key repository.
*/
+isc_result_t
+dns_zone_nscheck(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version,
+ unsigned int *errors);
+/*%
+ * Check if the name servers for the zone are sane (have address, don't
+ * refer to CNAMEs/DNAMEs. The number of constiancy errors detected in
+ * returned in '*errors'
+ *
+ * Requires:
+ * \li 'zone' to be valid.
+ * \li 'db' to be valid.
+ * \li 'version' to be valid or NULL.
+ * \li 'errors' to be non NULL.
+ *
+ * Returns:
+ * ISC_R_SUCCESS if there were no errors examining the zone contents.
+ */
+
+
ISC_LANG_ENDDECLS
#endif /* DNS_ZONE_H */
diff --git a/lib/dns/keytable.c b/lib/dns/keytable.c
index d2cd6bd4..f5401fdd 100644
--- a/lib/dns/keytable.c
+++ b/lib/dns/keytable.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: keytable.c,v 1.38 2009/07/13 23:47:42 tbox Exp $ */
+/* $Id: keytable.c,v 1.39 2009/12/03 15:40:02 each Exp $ */
/*! \file */
@@ -36,7 +36,7 @@ free_keynode(void *node, void *arg) {
dns_keynode_t *keynode = node;
isc_mem_t *mctx = arg;
- dns_keynode_detach(mctx, &keynode);
+ dns_keynode_detachall(mctx, &keynode);
}
isc_result_t
@@ -283,7 +283,7 @@ dns_keytable_deletekeynode(dns_keytable_t *keytable, dst_key_t *dstkey) {
while (knode != NULL) {
if (dst_key_compare(knode->key, dstkey) == ISC_TRUE)
break;
- kprev = &knode;
+ kprev = &knode->next;
knode = knode->next;
}
@@ -483,6 +483,25 @@ dns_keytable_finddeepestmatch(dns_keytable_t *keytable, dns_name_t *name,
}
void
+dns_keytable_attachkeynode(dns_keytable_t *keytable, dns_keynode_t *source,
+ dns_keynode_t **target)
+{
+ /*
+ * Give back a keynode found via dns_keytable_findkeynode().
+ */
+
+ REQUIRE(VALID_KEYTABLE(keytable));
+ REQUIRE(VALID_KEYNODE(source));
+ REQUIRE(target != NULL && *target == NULL);
+
+ LOCK(&keytable->lock);
+ keytable->active_nodes++;
+ UNLOCK(&keytable->lock);
+
+ dns_keynode_attach(source, target);
+}
+
+void
dns_keytable_detachkeynode(dns_keytable_t *keytable, dns_keynode_t **keynodep)
{
/*
@@ -596,10 +615,20 @@ dns_keynode_detach(isc_mem_t *mctx, dns_keynode_t **keynode) {
if (refs == 0) {
if (node->key != NULL)
dst_key_free(&node->key);
- if (node->next != NULL)
- dns_keynode_detach(mctx, &node->next);
isc_refcount_destroy(&node->refcount);
isc_mem_put(mctx, node, sizeof(dns_keynode_t));
}
*keynode = NULL;
}
+
+void
+dns_keynode_detachall(isc_mem_t *mctx, dns_keynode_t **keynode) {
+ dns_keynode_t *next = NULL, *node = *keynode;
+ REQUIRE(VALID_KEYNODE(node));
+ while (node != NULL) {
+ next = node->next;
+ dns_keynode_detach(mctx, &node);
+ node = next;
+ }
+ *keynode = NULL;
+}
diff --git a/lib/dns/nsec3.c b/lib/dns/nsec3.c
index 2598a601..3ae4f2da 100644
--- a/lib/dns/nsec3.c
+++ b/lib/dns/nsec3.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nsec3.c,v 1.12 2009/11/03 23:48:23 tbox Exp $ */
+/* $Id: nsec3.c,v 1.13 2009/12/01 05:28:40 marka Exp $ */
#include <config.h>
@@ -1457,6 +1457,7 @@ dns_nsec3_delnsec3sx(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
*/
CHECK(dns_nsec3_delnsec3(db, version, name, &nsec3param, diff));
}
+ dns_rdataset_disassociate(&rdataset);
try_private:
if (type == 0)
diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c
index 5aef2c5e..71d338d6 100644
--- a/lib/dns/rbtdb.c
+++ b/lib/dns/rbtdb.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rbtdb.c,v 1.289 2009/11/23 02:10:16 marka Exp $ */
+/* $Id: rbtdb.c,v 1.292 2009/11/26 23:48:14 tbox Exp $ */
/*! \file */
@@ -3644,11 +3644,17 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
/*
* The node may be a zone cut itself. If it might be one,
* make sure we check for it later.
+ *
+ * DS records live above the zone cut in ordinary zone so
+ * we want to ignore any referral.
+ *
+ * Stub zones don't have anything "above" the delgation so
+ * we always return a referral.
*/
if (node->find_callback &&
- (node != search.rbtdb->origin_node ||
- IS_STUB(search.rbtdb)) &&
- !dns_rdatatype_atparent(type))
+ ((node != search.rbtdb->origin_node &&
+ !dns_rdatatype_atparent(type)) ||
+ IS_STUB(search.rbtdb)))
maybe_zonecut = ISC_TRUE;
}
@@ -4664,6 +4670,8 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
* If we didn't find what we were looking for...
*/
if (found == NULL ||
+ (found->trust == dns_trust_additional &&
+ ((options & DNS_DBFIND_ADDITIONALOK) == 0)) ||
(found->trust == dns_trust_glue &&
((options & DNS_DBFIND_GLUEOK) == 0)) ||
(DNS_TRUST_PENDING(found->trust) &&
diff --git a/lib/dns/rdata.c b/lib/dns/rdata.c
index 32598002..77c7f7bd 100644
--- a/lib/dns/rdata.c
+++ b/lib/dns/rdata.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdata.c,v 1.203 2009/10/08 23:13:07 marka Exp $ */
+/* $Id: rdata.c,v 1.204 2009/12/04 21:09:33 marka Exp $ */
/*! \file */
@@ -349,6 +349,37 @@ dns_rdata_compare(const dns_rdata_t *rdata1, const dns_rdata_t *rdata2) {
return (result);
}
+int
+dns_rdata_casecompare(const dns_rdata_t *rdata1, const dns_rdata_t *rdata2) {
+ int result = 0;
+ isc_boolean_t use_default = ISC_FALSE;
+
+ REQUIRE(rdata1 != NULL);
+ REQUIRE(rdata2 != NULL);
+ REQUIRE(rdata1->data != NULL);
+ REQUIRE(rdata2->data != NULL);
+ REQUIRE(DNS_RDATA_VALIDFLAGS(rdata1));
+ REQUIRE(DNS_RDATA_VALIDFLAGS(rdata2));
+
+ if (rdata1->rdclass != rdata2->rdclass)
+ return (rdata1->rdclass < rdata2->rdclass ? -1 : 1);
+
+ if (rdata1->type != rdata2->type)
+ return (rdata1->type < rdata2->type ? -1 : 1);
+
+ CASECOMPARESWITCH
+
+ if (use_default) {
+ isc_region_t r1;
+ isc_region_t r2;
+
+ dns_rdata_toregion(rdata1, &r1);
+ dns_rdata_toregion(rdata2, &r2);
+ result = isc_region_compare(&r1, &r2);
+ }
+ return (result);
+}
+
/***
*** Conversions
***/
diff --git a/lib/dns/rdata/any_255/tsig_250.c b/lib/dns/rdata/any_255/tsig_250.c
index 3121f782..3cc54a8b 100644
--- a/lib/dns/rdata/any_255/tsig_250.c
+++ b/lib/dns/rdata/any_255/tsig_250.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 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: tsig_250.c,v 1.63 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: tsig_250.c,v 1.65 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Thu Mar 16 13:39:43 PST 2000 by gson */
@@ -594,4 +594,9 @@ checknames_any_tsig(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_any_tsig(ARGS_COMPARE) {
+ return (compare_any_tsig(rdata1, rdata2));
+}
+
#endif /* RDATA_ANY_255_TSIG_250_C */
diff --git a/lib/dns/rdata/ch_3/a_1.c b/lib/dns/rdata/ch_3/a_1.c
index 78d4ecda..e3f98106 100644
--- a/lib/dns/rdata/ch_3/a_1.c
+++ b/lib/dns/rdata/ch_3/a_1.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2005, 2007, 2009 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 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: a_1.c,v 1.6 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: a_1.c,v 1.8 2009/12/04 22:06:37 tbox Exp $ */
/* by Bjorn.Victor@it.uu.se, 2005-05-07 */
/* Based on generic/soa_6.c and generic/mx_15.c */
@@ -107,7 +107,7 @@ fromwire_ch_a(ARGS_FROMWIRE) {
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
dns_name_init(&name, NULL);
-
+
RETERR(dns_name_fromwire(&name, source, dctx, options, target));
isc_buffer_activeregion(source, &sregion);
@@ -205,7 +205,7 @@ fromstruct_ch_a(ARGS_FROMSTRUCT) {
dns_name_toregion(&a->ch_addr_dom, &region);
RETERR(isc_buffer_copyregion(target, &region));
-
+
return (uint16_tobuffer(ntohs(a->ch_addr), target));
}
@@ -313,4 +313,8 @@ checknames_ch_a(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_ch_a(ARGS_COMPARE) {
+ return (compare_ch_a(rdata1, rdata2));
+}
#endif /* RDATA_CH_3_A_1_C */
diff --git a/lib/dns/rdata/generic/afsdb_18.c b/lib/dns/rdata/generic/afsdb_18.c
index 2230efb1..279f86c6 100644
--- a/lib/dns/rdata/generic/afsdb_18.c
+++ b/lib/dns/rdata/generic/afsdb_18.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 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: afsdb_18.c,v 1.47 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: afsdb_18.c,v 1.49 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Wed Mar 15 14:59:00 PST 2000 by explorer */
@@ -306,4 +306,8 @@ checknames_afsdb(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_afsdb(ARGS_COMPARE) {
+ return (compare_afsdb(rdata1, rdata2));
+}
#endif /* RDATA_GENERIC_AFSDB_18_C */
diff --git a/lib/dns/rdata/generic/cert_37.c b/lib/dns/rdata/generic/cert_37.c
index 2c45230a..dfe090c9 100644
--- a/lib/dns/rdata/generic/cert_37.c
+++ b/lib/dns/rdata/generic/cert_37.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 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: cert_37.c,v 1.50 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: cert_37.c,v 1.52 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Wed Mar 15 21:14:32 EST 2000 by tale */
@@ -276,5 +276,9 @@ checknames_cert(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
-#endif /* RDATA_GENERIC_CERT_37_C */
+static inline int
+casecompare_cert(ARGS_COMPARE) {
+ return (compare_cert(rdata1, rdata2));
+}
+#endif /* RDATA_GENERIC_CERT_37_C */
diff --git a/lib/dns/rdata/generic/cname_5.c b/lib/dns/rdata/generic/cname_5.c
index 28c3d602..45a48a89 100644
--- a/lib/dns/rdata/generic/cname_5.c
+++ b/lib/dns/rdata/generic/cname_5.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: cname_5.c,v 1.47 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: cname_5.c,v 1.49 2009/12/04 22:06:37 tbox Exp $ */
/* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */
@@ -229,4 +229,9 @@ checknames_cname(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_cname(ARGS_COMPARE) {
+ return (compare_cname(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_CNAME_5_C */
diff --git a/lib/dns/rdata/generic/dlv_32769.c b/lib/dns/rdata/generic/dlv_32769.c
index 957f038f..d2229220 100644
--- a/lib/dns/rdata/generic/dlv_32769.c
+++ b/lib/dns/rdata/generic/dlv_32769.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006, 2007, 2009 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 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dlv_32769.c,v 1.6 2007/06/18 23:47:43 tbox Exp $ */
+/* $Id: dlv_32769.c,v 1.8 2009/12/04 22:06:37 tbox Exp $ */
/* draft-ietf-dnsext-delegation-signer-05.txt */
@@ -144,7 +144,7 @@ fromwire_dlv(ARGS_FROMWIRE) {
UNUSED(options);
isc_buffer_activeregion(source, &sr);
-
+
/*
* Check digest lengths if we know them.
*/
@@ -164,7 +164,7 @@ fromwire_dlv(ARGS_FROMWIRE) {
sr.length = 4 + ISC_SHA1_DIGESTLENGTH;
else if (sr.base[3] == DNS_DSDIGEST_SHA256)
sr.length = 4 + ISC_SHA256_DIGESTLENGTH;
-
+
isc_buffer_forward(source, sr.length);
return (mem_tobuffer(target, sr.base, sr.length));
}
@@ -318,4 +318,9 @@ checknames_dlv(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_dlv(ARGS_COMPARE) {
+ return (compare_dlv(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_DLV_32769_C */
diff --git a/lib/dns/rdata/generic/dname_39.c b/lib/dns/rdata/generic/dname_39.c
index c399f1e7..d899494f 100644
--- a/lib/dns/rdata/generic/dname_39.c
+++ b/lib/dns/rdata/generic/dname_39.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dname_39.c,v 1.38 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: dname_39.c,v 1.40 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Wed Mar 15 16:52:38 PST 2000 by explorer */
@@ -230,4 +230,8 @@ checknames_dname(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_dname(ARGS_COMPARE) {
+ return (compare_dname(rdata1, rdata2));
+}
#endif /* RDATA_GENERIC_DNAME_39_C */
diff --git a/lib/dns/rdata/generic/dnskey_48.c b/lib/dns/rdata/generic/dnskey_48.c
index 2e11cbae..e20af033 100644
--- a/lib/dns/rdata/generic/dnskey_48.c
+++ b/lib/dns/rdata/generic/dnskey_48.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 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: dnskey_48.c,v 1.8 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: dnskey_48.c,v 1.10 2009/12/04 22:06:37 tbox Exp $ */
/*
* Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley.
@@ -76,6 +76,7 @@ totext_dnskey(ARGS_TOTEXT) {
char buf[sizeof("64000")];
unsigned int flags;
unsigned char algorithm;
+ char namebuf[DNS_NAME_FORMATSIZE];
REQUIRE(rdata->type == 48);
REQUIRE(rdata->length != 0);
@@ -105,6 +106,15 @@ totext_dnskey(ARGS_TOTEXT) {
if ((flags & 0xc000) == 0xc000)
return (ISC_R_SUCCESS);
+ if ((tctx->flags & DNS_STYLEFLAG_COMMENT) != 0 &&
+ algorithm == DNS_KEYALG_PRIVATEDNS) {
+ dns_name_t name;
+ dns_name_init(&name, NULL);
+ dns_name_fromregion(&name, &sr);
+ dns_name_format(&name, namebuf, sizeof(namebuf));
+ } else
+ namebuf[0] = 0;
+
/* key */
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
RETERR(str_totext(" (", target));
@@ -127,12 +137,18 @@ totext_dnskey(ARGS_TOTEXT) {
dns_rdata_toregion(rdata, &tmpr);
sprintf(buf, "%u", dst_region_computeid(&tmpr, algorithm));
RETERR(str_totext(buf, target));
+ if (algorithm == DNS_KEYALG_PRIVATEDNS) {
+ RETERR(str_totext(tctx->linebreak, target));
+ RETERR(str_totext("; alg = ", target));
+ RETERR(str_totext(namebuf, target));
+ }
}
return (ISC_R_SUCCESS);
}
static inline isc_result_t
fromwire_dnskey(ARGS_FROMWIRE) {
+ unsigned char algorithm;
isc_region_t sr;
REQUIRE(type == 48);
@@ -146,6 +162,18 @@ fromwire_dnskey(ARGS_FROMWIRE) {
if (sr.length < 4)
return (ISC_R_UNEXPECTEDEND);
+ algorithm = sr.base[3];
+ RETERR(mem_tobuffer(target, sr.base, 4));
+ isc_region_consume(&sr, 4);
+ isc_buffer_forward(source, 4);
+
+ if (algorithm == DNS_KEYALG_PRIVATEDNS) {
+ dns_name_t name;
+ dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
+ dns_name_init(&name, NULL);
+ RETERR(dns_name_fromwire(&name, source, dctx, options, target));
+ }
+ isc_buffer_activeregion(source, &sr);
isc_buffer_forward(source, sr.length);
return (mem_tobuffer(target, sr.base, sr.length));
}
@@ -309,4 +337,13 @@ checknames_dnskey(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_dnskey(ARGS_COMPARE) {
+
+ /*
+ * Treat ALG 253 (private DNS) subtype name case sensistively.
+ */
+ return (compare_dnskey(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_DNSKEY_48_C */
diff --git a/lib/dns/rdata/generic/ds_43.c b/lib/dns/rdata/generic/ds_43.c
index 08e5d5f7..c592093d 100644
--- a/lib/dns/rdata/generic/ds_43.c
+++ b/lib/dns/rdata/generic/ds_43.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ds_43.c,v 1.12 2007/06/18 23:47:43 tbox Exp $ */
+/* $Id: ds_43.c,v 1.14 2009/12/04 22:06:37 tbox Exp $ */
/* draft-ietf-dnsext-delegation-signer-05.txt */
@@ -318,4 +318,9 @@ checknames_ds(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_ds(ARGS_COMPARE) {
+ return (compare_ds(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_DS_43_C */
diff --git a/lib/dns/rdata/generic/gpos_27.c b/lib/dns/rdata/generic/gpos_27.c
index 18effb5a..ce71822b 100644
--- a/lib/dns/rdata/generic/gpos_27.c
+++ b/lib/dns/rdata/generic/gpos_27.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: gpos_27.c,v 1.41 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: gpos_27.c,v 1.43 2009/12/04 22:06:37 tbox Exp $ */
/* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */
@@ -249,4 +249,9 @@ checknames_gpos(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_gpos(ARGS_COMPARE) {
+ return (compare_gpos(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_GPOS_27_C */
diff --git a/lib/dns/rdata/generic/hinfo_13.c b/lib/dns/rdata/generic/hinfo_13.c
index 53213574..10b4fec7 100644
--- a/lib/dns/rdata/generic/hinfo_13.c
+++ b/lib/dns/rdata/generic/hinfo_13.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: hinfo_13.c,v 1.44 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: hinfo_13.c,v 1.46 2009/12/04 22:06:37 tbox Exp $ */
/*
* Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley.
@@ -221,4 +221,8 @@ checknames_hinfo(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_hinfo(ARGS_COMPARE) {
+ return (compare_hinfo(rdata1, rdata2));
+}
#endif /* RDATA_GENERIC_HINFO_13_C */
diff --git a/lib/dns/rdata/generic/hip_55.c b/lib/dns/rdata/generic/hip_55.c
index 10106620..cc7ded31 100644
--- a/lib/dns/rdata/generic/hip_55.c
+++ b/lib/dns/rdata/generic/hip_55.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: hip_55.c,v 1.4 2009/09/02 23:43:54 each Exp $ */
+/* $Id: hip_55.c,v 1.6 2009/12/04 22:06:37 tbox Exp $ */
/* reviewed: TBC */
@@ -449,4 +449,62 @@ dns_rdata_hip_current(dns_rdata_hip_t *hip, dns_name_t *name) {
INSIST(name->length + hip->offset <= hip->servers_len);
}
+static inline int
+casecompare_hip(ARGS_COMPARE) {
+ isc_region_t r1;
+ isc_region_t r2;
+ dns_name_t name1;
+ dns_name_t name2;
+ int order;
+ isc_uint8_t hit_len;
+ isc_uint16_t key_len;
+
+ REQUIRE(rdata1->type == rdata2->type);
+ REQUIRE(rdata1->rdclass == rdata2->rdclass);
+ REQUIRE(rdata1->type == 55);
+ REQUIRE(rdata1->length != 0);
+ REQUIRE(rdata2->length != 0);
+
+ dns_rdata_toregion(rdata1, &r1);
+ dns_rdata_toregion(rdata2, &r2);
+
+ INSIST(r1.length > 4);
+ INSIST(r2.length > 4);
+ r1.length = 4;
+ r2.length = 4;
+ order = isc_region_compare(&r1, &r2);
+ if (order != 0)
+ return (order);
+
+ hit_len = uint8_fromregion(&r1);
+ isc_region_consume(&r1, 2); /* hit length + algorithm */
+ key_len = uint16_fromregion(&r1);
+
+ dns_rdata_toregion(rdata1, &r1);
+ dns_rdata_toregion(rdata2, &r2);
+ isc_region_consume(&r1, 4);
+ isc_region_consume(&r2, 4);
+ INSIST(r1.length >= (unsigned) (hit_len + key_len));
+ INSIST(r2.length >= (unsigned) (hit_len + key_len));
+ order = isc_region_compare(&r1, &r2);
+ if (order != 0)
+ return (order);
+ isc_region_consume(&r1, hit_len + key_len);
+ isc_region_consume(&r2, hit_len + key_len);
+
+ dns_name_init(&name1, NULL);
+ dns_name_init(&name2, NULL);
+ while (r1.length != 0 && r2.length != 0) {
+ dns_name_fromregion(&name1, &r1);
+ dns_name_fromregion(&name2, &r2);
+ order = dns_name_rdatacompare(&name1, &name2);
+ if (order != 0)
+ return (order);
+
+ isc_region_consume(&r1, name_length(&name1));
+ isc_region_consume(&r2, name_length(&name2));
+ }
+ return (isc_region_compare(&r1, &r2));
+}
+
#endif /* RDATA_GENERIC_HIP_5_C */
diff --git a/lib/dns/rdata/generic/ipseckey_45.c b/lib/dns/rdata/generic/ipseckey_45.c
index 2cf13b28..072f13d6 100644
--- a/lib/dns/rdata/generic/ipseckey_45.c
+++ b/lib/dns/rdata/generic/ipseckey_45.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ipseckey_45.c,v 1.7 2009/09/18 21:55:21 jinmei Exp $ */
+/* $Id: ipseckey_45.c,v 1.9 2009/12/04 22:06:37 tbox Exp $ */
#ifndef RDATA_GENERIC_IPSECKEY_45_C
#define RDATA_GENERIC_IPSECKEY_45_C
@@ -460,4 +460,43 @@ checknames_ipseckey(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_ipseckey(ARGS_COMPARE) {
+ isc_region_t region1;
+ isc_region_t region2;
+ dns_name_t name1;
+ dns_name_t name2;
+ int order;
+
+ REQUIRE(rdata1->type == rdata2->type);
+ REQUIRE(rdata1->rdclass == rdata2->rdclass);
+ REQUIRE(rdata1->type == 45);
+ REQUIRE(rdata1->length >= 3);
+ REQUIRE(rdata2->length >= 3);
+
+ dns_rdata_toregion(rdata1, &region1);
+ dns_rdata_toregion(rdata2, &region2);
+
+ if (memcmp(region1.base, region2.base, 3) != 0 || region1.base[1] != 3)
+ return (isc_region_compare(&region1, &region2));
+
+ dns_name_init(&name1, NULL);
+ dns_name_init(&name2, NULL);
+
+ isc_region_consume(&region1, 3);
+ isc_region_consume(&region2, 3);
+
+ dns_name_fromregion(&name1, &region1);
+ dns_name_fromregion(&name2, &region2);
+
+ order = dns_name_rdatacompare(&name1, &name2);
+ if (order != 0)
+ return (order);
+
+ isc_region_consume(&region1, name_length(&name1));
+ isc_region_consume(&region2, name_length(&name2));
+
+ return (isc_region_compare(&region1, &region2));
+}
+
#endif /* RDATA_GENERIC_IPSECKEY_45_C */
diff --git a/lib/dns/rdata/generic/isdn_20.c b/lib/dns/rdata/generic/isdn_20.c
index d7333d14..5aac73f3 100644
--- a/lib/dns/rdata/generic/isdn_20.c
+++ b/lib/dns/rdata/generic/isdn_20.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: isdn_20.c,v 1.38 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: isdn_20.c,v 1.40 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Wed Mar 15 16:53:11 PST 2000 by bwelling */
@@ -231,4 +231,9 @@ checknames_isdn(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_isdn(ARGS_COMPARE) {
+ return (compare_isdn(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_ISDN_20_C */
diff --git a/lib/dns/rdata/generic/key_25.c b/lib/dns/rdata/generic/key_25.c
index 9acfe95f..7ae8e4eb 100644
--- a/lib/dns/rdata/generic/key_25.c
+++ b/lib/dns/rdata/generic/key_25.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 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: key_25.c,v 1.51 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: key_25.c,v 1.53 2009/12/04 22:06:37 tbox Exp $ */
/*
* Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley.
@@ -76,6 +76,7 @@ totext_key(ARGS_TOTEXT) {
char buf[sizeof("64000")];
unsigned int flags;
unsigned char algorithm;
+ char namebuf[DNS_NAME_FORMATSIZE];
REQUIRE(rdata->type == 25);
REQUIRE(rdata->length != 0);
@@ -105,6 +106,15 @@ totext_key(ARGS_TOTEXT) {
if ((flags & 0xc000) == 0xc000)
return (ISC_R_SUCCESS);
+ if ((tctx->flags & DNS_STYLEFLAG_COMMENT) != 0 &&
+ algorithm == DNS_KEYALG_PRIVATEDNS) {
+ dns_name_t name;
+ dns_name_init(&name, NULL);
+ dns_name_fromregion(&name, &sr);
+ dns_name_format(&name, namebuf, sizeof(namebuf));
+ } else
+ namebuf[0] = 0;
+
/* key */
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
RETERR(str_totext(" (", target));
@@ -127,12 +137,18 @@ totext_key(ARGS_TOTEXT) {
dns_rdata_toregion(rdata, &tmpr);
sprintf(buf, "%u", dst_region_computeid(&tmpr, algorithm));
RETERR(str_totext(buf, target));
+ if (algorithm == DNS_KEYALG_PRIVATEDNS) {
+ RETERR(str_totext(tctx->linebreak, target));
+ RETERR(str_totext("; alg = ", target));
+ RETERR(str_totext(namebuf, target));
+ }
}
return (ISC_R_SUCCESS);
}
static inline isc_result_t
fromwire_key(ARGS_FROMWIRE) {
+ unsigned char algorithm;
isc_region_t sr;
REQUIRE(type == 25);
@@ -146,6 +162,18 @@ fromwire_key(ARGS_FROMWIRE) {
if (sr.length < 4)
return (ISC_R_UNEXPECTEDEND);
+ algorithm = sr.base[3];
+ RETERR(mem_tobuffer(target, sr.base, 4));
+ isc_region_consume(&sr, 4);
+ isc_buffer_forward(source, 4);
+
+ if (algorithm == DNS_KEYALG_PRIVATEDNS) {
+ dns_name_t name;
+ dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
+ dns_name_init(&name, NULL);
+ RETERR(dns_name_fromwire(&name, source, dctx, options, target));
+ }
+ isc_buffer_activeregion(source, &sr);
isc_buffer_forward(source, sr.length);
return (mem_tobuffer(target, sr.base, sr.length));
}
@@ -309,4 +337,9 @@ checknames_key(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_key(ARGS_COMPARE) {
+ return (compare_key(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_KEY_25_C */
diff --git a/lib/dns/rdata/generic/keydata_65533.c b/lib/dns/rdata/generic/keydata_65533.c
index 0d374a05..a243e9b1 100644
--- a/lib/dns/rdata/generic/keydata_65533.c
+++ b/lib/dns/rdata/generic/keydata_65533.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: keydata_65533.c,v 1.2 2009/06/30 02:52:32 each Exp $ */
+/* $Id: keydata_65533.c,v 1.3 2009/12/04 21:09:33 marka Exp $ */
#ifndef GENERIC_KEYDATA_65533_C
#define GENERIC_KEYDATA_65533_C 1
@@ -369,4 +369,9 @@ checknames_keydata(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_keydata(ARGS_COMPARE) {
+ return (compare_keydata(rdata1, rdata2));
+}
+
#endif /* GENERIC_KEYDATA_65533_C */
diff --git a/lib/dns/rdata/generic/loc_29.c b/lib/dns/rdata/generic/loc_29.c
index f5b84576..904dbb40 100644
--- a/lib/dns/rdata/generic/loc_29.c
+++ b/lib/dns/rdata/generic/loc_29.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: loc_29.c,v 1.49 2009/02/17 05:53:13 marka Exp $ */
+/* $Id: loc_29.c,v 1.50 2009/12/04 21:09:33 marka Exp $ */
/* Reviewed: Wed Mar 15 18:13:09 PST 2000 by explorer */
@@ -796,4 +796,9 @@ checknames_loc(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_loc(ARGS_COMPARE) {
+ return (compare_loc(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_LOC_29_C */
diff --git a/lib/dns/rdata/generic/mb_7.c b/lib/dns/rdata/generic/mb_7.c
index fc3a7b60..8e588fc7 100644
--- a/lib/dns/rdata/generic/mb_7.c
+++ b/lib/dns/rdata/generic/mb_7.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mb_7.c,v 1.45 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: mb_7.c,v 1.47 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Wed Mar 15 17:31:26 PST 2000 by bwelling */
@@ -69,7 +69,7 @@ totext_mb(ARGS_TOTEXT) {
static inline isc_result_t
fromwire_mb(ARGS_FROMWIRE) {
- dns_name_t name;
+ dns_name_t name;
REQUIRE(type == 7);
@@ -78,8 +78,8 @@ fromwire_mb(ARGS_FROMWIRE) {
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
- dns_name_init(&name, NULL);
- return (dns_name_fromwire(&name, source, dctx, options, target));
+ dns_name_init(&name, NULL);
+ return (dns_name_fromwire(&name, source, dctx, options, target));
}
static inline isc_result_t
@@ -231,4 +231,9 @@ checknames_mb(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_mb(ARGS_COMPARE) {
+ return (compare_mb(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_MB_7_C */
diff --git a/lib/dns/rdata/generic/md_3.c b/lib/dns/rdata/generic/md_3.c
index 0f8560fc..e00f1f6c 100644
--- a/lib/dns/rdata/generic/md_3.c
+++ b/lib/dns/rdata/generic/md_3.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: md_3.c,v 1.47 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: md_3.c,v 1.49 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Wed Mar 15 17:48:20 PST 2000 by bwelling */
@@ -69,7 +69,7 @@ totext_md(ARGS_TOTEXT) {
static inline isc_result_t
fromwire_md(ARGS_FROMWIRE) {
- dns_name_t name;
+ dns_name_t name;
REQUIRE(type == 3);
@@ -78,8 +78,8 @@ fromwire_md(ARGS_FROMWIRE) {
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
- dns_name_init(&name, NULL);
- return (dns_name_fromwire(&name, source, dctx, options, target));
+ dns_name_init(&name, NULL);
+ return (dns_name_fromwire(&name, source, dctx, options, target));
}
static inline isc_result_t
@@ -233,4 +233,9 @@ checknames_md(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_md(ARGS_COMPARE) {
+ return (compare_md(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_MD_3_C */
diff --git a/lib/dns/rdata/generic/mf_4.c b/lib/dns/rdata/generic/mf_4.c
index dffcec2c..a85809ae 100644
--- a/lib/dns/rdata/generic/mf_4.c
+++ b/lib/dns/rdata/generic/mf_4.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mf_4.c,v 1.45 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: mf_4.c,v 1.47 2009/12/04 22:06:37 tbox Exp $ */
/* reviewed: Wed Mar 15 17:47:33 PST 2000 by brister */
@@ -69,7 +69,7 @@ totext_mf(ARGS_TOTEXT) {
static inline isc_result_t
fromwire_mf(ARGS_FROMWIRE) {
- dns_name_t name;
+ dns_name_t name;
REQUIRE(type == 4);
@@ -78,8 +78,8 @@ fromwire_mf(ARGS_FROMWIRE) {
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
- dns_name_init(&name, NULL);
- return (dns_name_fromwire(&name, source, dctx, options, target));
+ dns_name_init(&name, NULL);
+ return (dns_name_fromwire(&name, source, dctx, options, target));
}
static inline isc_result_t
@@ -232,4 +232,9 @@ checknames_mf(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_mf(ARGS_COMPARE) {
+ return (compare_mf(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_MF_4_C */
diff --git a/lib/dns/rdata/generic/mg_8.c b/lib/dns/rdata/generic/mg_8.c
index e4dca1dd..d0af188e 100644
--- a/lib/dns/rdata/generic/mg_8.c
+++ b/lib/dns/rdata/generic/mg_8.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mg_8.c,v 1.43 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: mg_8.c,v 1.45 2009/12/04 22:06:37 tbox Exp $ */
/* reviewed: Wed Mar 15 17:49:21 PST 2000 by brister */
@@ -69,7 +69,7 @@ totext_mg(ARGS_TOTEXT) {
static inline isc_result_t
fromwire_mg(ARGS_FROMWIRE) {
- dns_name_t name;
+ dns_name_t name;
REQUIRE(type == 8);
@@ -78,8 +78,8 @@ fromwire_mg(ARGS_FROMWIRE) {
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
- dns_name_init(&name, NULL);
- return (dns_name_fromwire(&name, source, dctx, options, target));
+ dns_name_init(&name, NULL);
+ return (dns_name_fromwire(&name, source, dctx, options, target));
}
static inline isc_result_t
@@ -227,4 +227,9 @@ checknames_mg(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_mg(ARGS_COMPARE) {
+ return (compare_mg(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_MG_8_C */
diff --git a/lib/dns/rdata/generic/minfo_14.c b/lib/dns/rdata/generic/minfo_14.c
index 6645bbc0..9e2214c9 100644
--- a/lib/dns/rdata/generic/minfo_14.c
+++ b/lib/dns/rdata/generic/minfo_14.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: minfo_14.c,v 1.45 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: minfo_14.c,v 1.47 2009/12/04 22:06:37 tbox Exp $ */
/* reviewed: Wed Mar 15 17:45:32 PST 2000 by brister */
@@ -93,8 +93,8 @@ totext_minfo(ARGS_TOTEXT) {
static inline isc_result_t
fromwire_minfo(ARGS_FROMWIRE) {
- dns_name_t rmail;
- dns_name_t email;
+ dns_name_t rmail;
+ dns_name_t email;
REQUIRE(type == 14);
@@ -103,11 +103,11 @@ fromwire_minfo(ARGS_FROMWIRE) {
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
- dns_name_init(&rmail, NULL);
- dns_name_init(&email, NULL);
+ dns_name_init(&rmail, NULL);
+ dns_name_init(&email, NULL);
- RETERR(dns_name_fromwire(&rmail, source, dctx, options, target));
- return (dns_name_fromwire(&email, source, dctx, options, target));
+ RETERR(dns_name_fromwire(&rmail, source, dctx, options, target));
+ return (dns_name_fromwire(&email, source, dctx, options, target));
}
static inline isc_result_t
@@ -321,4 +321,9 @@ checknames_minfo(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_minfo(ARGS_COMPARE) {
+ return (compare_minfo(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_MINFO_14_C */
diff --git a/lib/dns/rdata/generic/mr_9.c b/lib/dns/rdata/generic/mr_9.c
index 289d7395..590235d9 100644
--- a/lib/dns/rdata/generic/mr_9.c
+++ b/lib/dns/rdata/generic/mr_9.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mr_9.c,v 1.42 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: mr_9.c,v 1.44 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Wed Mar 15 21:30:35 EST 2000 by tale */
@@ -69,7 +69,7 @@ totext_mr(ARGS_TOTEXT) {
static inline isc_result_t
fromwire_mr(ARGS_FROMWIRE) {
- dns_name_t name;
+ dns_name_t name;
REQUIRE(type == 9);
@@ -78,8 +78,8 @@ fromwire_mr(ARGS_FROMWIRE) {
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
- dns_name_init(&name, NULL);
- return (dns_name_fromwire(&name, source, dctx, options, target));
+ dns_name_init(&name, NULL);
+ return (dns_name_fromwire(&name, source, dctx, options, target));
}
static inline isc_result_t
@@ -228,4 +228,9 @@ checknames_mr(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_mr(ARGS_COMPARE) {
+ return (compare_mr(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_MR_9_C */
diff --git a/lib/dns/rdata/generic/mx_15.c b/lib/dns/rdata/generic/mx_15.c
index 086c043d..fd09e925 100644
--- a/lib/dns/rdata/generic/mx_15.c
+++ b/lib/dns/rdata/generic/mx_15.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 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
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mx_15.c,v 1.56 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: mx_15.c,v 1.58 2009/12/04 22:06:37 tbox Exp $ */
/* reviewed: Wed Mar 15 18:05:46 PST 2000 by brister */
@@ -120,7 +120,7 @@ totext_mx(ARGS_TOTEXT) {
static inline isc_result_t
fromwire_mx(ARGS_FROMWIRE) {
- dns_name_t name;
+ dns_name_t name;
isc_region_t sregion;
REQUIRE(type == 15);
@@ -130,7 +130,7 @@ fromwire_mx(ARGS_FROMWIRE) {
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
- dns_name_init(&name, NULL);
+ dns_name_init(&name, NULL);
isc_buffer_activeregion(source, &sregion);
if (sregion.length < 2)
@@ -316,4 +316,9 @@ checknames_mx(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_mx(ARGS_COMPARE) {
+ return (compare_mx(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_MX_15_C */
diff --git a/lib/dns/rdata/generic/ns_2.c b/lib/dns/rdata/generic/ns_2.c
index 9a2ee8c2..5db81e7c 100644
--- a/lib/dns/rdata/generic/ns_2.c
+++ b/lib/dns/rdata/generic/ns_2.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ns_2.c,v 1.46 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: ns_2.c,v 1.48 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Wed Mar 15 18:15:00 PST 2000 by bwelling */
@@ -77,7 +77,7 @@ totext_ns(ARGS_TOTEXT) {
static inline isc_result_t
fromwire_ns(ARGS_FROMWIRE) {
- dns_name_t name;
+ dns_name_t name;
REQUIRE(type == 2);
@@ -86,8 +86,8 @@ fromwire_ns(ARGS_FROMWIRE) {
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
- dns_name_init(&name, NULL);
- return (dns_name_fromwire(&name, source, dctx, options, target));
+ dns_name_init(&name, NULL);
+ return (dns_name_fromwire(&name, source, dctx, options, target));
}
static inline isc_result_t
@@ -248,4 +248,9 @@ checknames_ns(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_ns(ARGS_COMPARE) {
+ return (compare_ns(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_NS_2_C */
diff --git a/lib/dns/rdata/generic/nsec3_50.c b/lib/dns/rdata/generic/nsec3_50.c
index 271c74e5..fedd78b4 100644
--- a/lib/dns/rdata/generic/nsec3_50.c
+++ b/lib/dns/rdata/generic/nsec3_50.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nsec3_50.c,v 1.6 2009/01/17 23:47:43 tbox Exp $ */
+/* $Id: nsec3_50.c,v 1.7 2009/12/04 21:09:34 marka Exp $ */
/*
* Copyright (C) 2004 Nominet, Ltd.
@@ -478,4 +478,9 @@ checknames_nsec3(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_nsec3(ARGS_COMPARE) {
+ return (compare_nsec3(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_NSEC3_50_C */
diff --git a/lib/dns/rdata/generic/nsec3param_51.c b/lib/dns/rdata/generic/nsec3param_51.c
index 9186ccf0..379a46b5 100644
--- a/lib/dns/rdata/generic/nsec3param_51.c
+++ b/lib/dns/rdata/generic/nsec3param_51.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nsec3param_51.c,v 1.6 2009/01/17 23:47:43 tbox Exp $ */
+/* $Id: nsec3param_51.c,v 1.7 2009/12/04 21:09:34 marka Exp $ */
/*
* Copyright (C) 2004 Nominet, Ltd.
@@ -311,4 +311,9 @@ checknames_nsec3param(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_nsec3param(ARGS_COMPARE) {
+ return (compare_nsec3param(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_NSEC3PARAM_51_C */
diff --git a/lib/dns/rdata/generic/nsec_47.c b/lib/dns/rdata/generic/nsec_47.c
index 7e443d9b..ee9fb37c 100644
--- a/lib/dns/rdata/generic/nsec_47.c
+++ b/lib/dns/rdata/generic/nsec_47.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 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: nsec_47.c,v 1.11 2008/07/15 23:47:21 tbox Exp $ */
+/* $Id: nsec_47.c,v 1.13 2009/12/04 22:06:37 tbox Exp $ */
/* reviewed: Wed Mar 15 18:21:15 PST 2000 by brister */
@@ -363,4 +363,36 @@ checknames_nsec(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_nsec(ARGS_COMPARE) {
+ isc_region_t region1;
+ isc_region_t region2;
+ dns_name_t name1;
+ dns_name_t name2;
+ int order;
+
+ REQUIRE(rdata1->type == rdata2->type);
+ REQUIRE(rdata1->rdclass == rdata2->rdclass);
+ REQUIRE(rdata1->type == 47);
+ REQUIRE(rdata1->length != 0);
+ REQUIRE(rdata2->length != 0);
+
+ dns_name_init(&name1, NULL);
+ dns_name_init(&name2, NULL);
+
+ dns_rdata_toregion(rdata1, &region1);
+ dns_rdata_toregion(rdata2, &region2);
+
+ dns_name_fromregion(&name1, &region1);
+ dns_name_fromregion(&name2, &region2);
+
+ order = dns_name_rdatacompare(&name1, &name2);
+ if (order != 0)
+ return (order);
+
+ isc_region_consume(&region1, name_length(&name1));
+ isc_region_consume(&region2, name_length(&name2));
+
+ return (isc_region_compare(&region1, &region2));
+}
#endif /* RDATA_GENERIC_NSEC_47_C */
diff --git a/lib/dns/rdata/generic/null_10.c b/lib/dns/rdata/generic/null_10.c
index 00bb5429..717ed653 100644
--- a/lib/dns/rdata/generic/null_10.c
+++ b/lib/dns/rdata/generic/null_10.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: null_10.c,v 1.42 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: null_10.c,v 1.44 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Thu Mar 16 13:57:50 PST 2000 by explorer */
@@ -189,4 +189,9 @@ checknames_null(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_null(ARGS_COMPARE) {
+ return (compare_null(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_NULL_10_C */
diff --git a/lib/dns/rdata/generic/nxt_30.c b/lib/dns/rdata/generic/nxt_30.c
index 7ffb86c7..4d291a8e 100644
--- a/lib/dns/rdata/generic/nxt_30.c
+++ b/lib/dns/rdata/generic/nxt_30.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 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: nxt_30.c,v 1.63 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: nxt_30.c,v 1.65 2009/12/04 22:06:37 tbox Exp $ */
/* reviewed: Wed Mar 15 18:21:15 PST 2000 by brister */
@@ -326,4 +326,8 @@ checknames_nxt(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_nxt(ARGS_COMPARE) {
+ return (compare_nxt(rdata1, rdata2));
+}
#endif /* RDATA_GENERIC_NXT_30_C */
diff --git a/lib/dns/rdata/generic/opt_41.c b/lib/dns/rdata/generic/opt_41.c
index d2cfc2e7..0d87e531 100644
--- a/lib/dns/rdata/generic/opt_41.c
+++ b/lib/dns/rdata/generic/opt_41.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: opt_41.c,v 1.33 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: opt_41.c,v 1.35 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Thu Mar 16 14:06:44 PST 2000 by gson */
@@ -277,4 +277,9 @@ checknames_opt(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_opt(ARGS_COMPARE) {
+ return (compare_opt(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_OPT_41_C */
diff --git a/lib/dns/rdata/generic/proforma.c b/lib/dns/rdata/generic/proforma.c
index 879b7613..d1a5ecd7 100644
--- a/lib/dns/rdata/generic/proforma.c
+++ b/lib/dns/rdata/generic/proforma.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: proforma.c,v 1.36 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: proforma.c,v 1.38 2009/12/04 22:06:37 tbox Exp $ */
#ifndef RDATA_GENERIC_#_#_C
#define RDATA_GENERIC_#_#_C
@@ -170,4 +170,21 @@ checknames_#(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_#(ARGS_COMPARE) {
+ isc_region_t r1;
+ isc_region_t r2;
+
+ REQUIRE(rdata1->type == rdata2->type);
+ REQUIRE(rdata1->rdclass == rdata2->rdclass);
+ REQUIRE(rdata1->type == #);
+ REQUIRE(rdata1->rdclass == #);
+ REQUIRE(rdata1->length != 0); /* XXX */
+ REQUIRE(rdata2->length != 0); /* XXX */
+
+ dns_rdata_toregion(rdata1, &r1);
+ dns_rdata_toregion(rdata2, &r2);
+ return (isc_region_compare(&r1, &r2));
+}
+
#endif /* RDATA_GENERIC_#_#_C */
diff --git a/lib/dns/rdata/generic/ptr_12.c b/lib/dns/rdata/generic/ptr_12.c
index fbabcbf6..a619f137 100644
--- a/lib/dns/rdata/generic/ptr_12.c
+++ b/lib/dns/rdata/generic/ptr_12.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ptr_12.c,v 1.43 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: ptr_12.c,v 1.45 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Thu Mar 16 14:05:12 PST 2000 by explorer */
@@ -79,7 +79,7 @@ totext_ptr(ARGS_TOTEXT) {
static inline isc_result_t
fromwire_ptr(ARGS_FROMWIRE) {
- dns_name_t name;
+ dns_name_t name;
REQUIRE(type == 12);
@@ -88,8 +88,8 @@ fromwire_ptr(ARGS_FROMWIRE) {
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
- dns_name_init(&name, NULL);
- return (dns_name_fromwire(&name, source, dctx, options, target));
+ dns_name_init(&name, NULL);
+ return (dns_name_fromwire(&name, source, dctx, options, target));
}
static inline isc_result_t
@@ -288,4 +288,8 @@ checknames_ptr(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_ptr(ARGS_COMPARE) {
+ return (compare_ptr(rdata1, rdata2));
+}
#endif /* RDATA_GENERIC_PTR_12_C */
diff --git a/lib/dns/rdata/generic/rp_17.c b/lib/dns/rdata/generic/rp_17.c
index 557cb044..3291f7bb 100644
--- a/lib/dns/rdata/generic/rp_17.c
+++ b/lib/dns/rdata/generic/rp_17.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rp_17.c,v 1.42 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: rp_17.c,v 1.44 2009/12/04 22:06:37 tbox Exp $ */
/* RFC1183 */
@@ -93,8 +93,8 @@ totext_rp(ARGS_TOTEXT) {
static inline isc_result_t
fromwire_rp(ARGS_FROMWIRE) {
- dns_name_t rmail;
- dns_name_t email;
+ dns_name_t rmail;
+ dns_name_t email;
REQUIRE(type == 17);
@@ -103,11 +103,11 @@ fromwire_rp(ARGS_FROMWIRE) {
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
- dns_name_init(&rmail, NULL);
- dns_name_init(&email, NULL);
+ dns_name_init(&rmail, NULL);
+ dns_name_init(&email, NULL);
- RETERR(dns_name_fromwire(&rmail, source, dctx, options, target));
- return (dns_name_fromwire(&email, source, dctx, options, target));
+ RETERR(dns_name_fromwire(&rmail, source, dctx, options, target));
+ return (dns_name_fromwire(&email, source, dctx, options, target));
}
static inline isc_result_t
@@ -311,4 +311,8 @@ checknames_rp(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_rp(ARGS_COMPARE) {
+ return (compare_rp(rdata1, rdata2));
+}
#endif /* RDATA_GENERIC_RP_17_C */
diff --git a/lib/dns/rdata/generic/rrsig_46.c b/lib/dns/rdata/generic/rrsig_46.c
index a9af4bd0..078cd4cb 100644
--- a/lib/dns/rdata/generic/rrsig_46.c
+++ b/lib/dns/rdata/generic/rrsig_46.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 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: rrsig_46.c,v 1.10 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: rrsig_46.c,v 1.12 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Fri Mar 17 09:05:02 PST 2000 by gson */
@@ -548,4 +548,47 @@ checknames_rrsig(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_rrsig(ARGS_COMPARE) {
+ isc_region_t r1;
+ isc_region_t r2;
+ dns_name_t name1;
+ dns_name_t name2;
+ int order;
+
+ REQUIRE(rdata1->type == rdata2->type);
+ REQUIRE(rdata1->rdclass == rdata2->rdclass);
+ REQUIRE(rdata1->type == 46);
+ REQUIRE(rdata1->length != 0);
+ REQUIRE(rdata2->length != 0);
+
+ dns_rdata_toregion(rdata1, &r1);
+ dns_rdata_toregion(rdata2, &r2);
+
+ INSIST(r1.length > 18);
+ INSIST(r2.length > 18);
+ r1.length = 18;
+ r2.length = 18;
+ order = isc_region_compare(&r1, &r2);
+ if (order != 0)
+ return (order);
+
+ dns_name_init(&name1, NULL);
+ dns_name_init(&name2, NULL);
+ dns_rdata_toregion(rdata1, &r1);
+ dns_rdata_toregion(rdata2, &r2);
+ isc_region_consume(&r1, 18);
+ isc_region_consume(&r2, 18);
+ dns_name_fromregion(&name1, &r1);
+ dns_name_fromregion(&name2, &r2);
+ order = dns_name_rdatacompare(&name1, &name2);
+ if (order != 0)
+ return (order);
+
+ isc_region_consume(&r1, name_length(&name1));
+ isc_region_consume(&r2, name_length(&name2));
+
+ return (isc_region_compare(&r1, &r2));
+}
+
#endif /* RDATA_GENERIC_RRSIG_46_C */
diff --git a/lib/dns/rdata/generic/rt_21.c b/lib/dns/rdata/generic/rt_21.c
index 6444102d..8f71a2af 100644
--- a/lib/dns/rdata/generic/rt_21.c
+++ b/lib/dns/rdata/generic/rt_21.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 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: rt_21.c,v 1.46 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: rt_21.c,v 1.48 2009/12/04 22:06:37 tbox Exp $ */
/* reviewed: Thu Mar 16 15:02:31 PST 2000 by brister */
@@ -90,7 +90,7 @@ totext_rt(ARGS_TOTEXT) {
static inline isc_result_t
fromwire_rt(ARGS_FROMWIRE) {
- dns_name_t name;
+ dns_name_t name;
isc_region_t sregion;
isc_region_t tregion;
@@ -101,7 +101,7 @@ fromwire_rt(ARGS_FROMWIRE) {
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
- dns_name_init(&name, NULL);
+ dns_name_init(&name, NULL);
isc_buffer_activeregion(source, &sregion);
isc_buffer_availableregion(target, &tregion);
@@ -308,4 +308,9 @@ checknames_rt(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_rt(ARGS_COMPARE) {
+ return (compare_rt(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_RT_21_C */
diff --git a/lib/dns/rdata/generic/sig_24.c b/lib/dns/rdata/generic/sig_24.c
index e79e1e4f..4ac2040e 100644
--- a/lib/dns/rdata/generic/sig_24.c
+++ b/lib/dns/rdata/generic/sig_24.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 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: sig_24.c,v 1.66 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: sig_24.c,v 1.68 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Fri Mar 17 09:05:02 PST 2000 by gson */
@@ -575,4 +575,8 @@ checknames_sig(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_sig(ARGS_COMPARE) {
+ return (compare_sig(rdata1, rdata2));
+}
#endif /* RDATA_GENERIC_SIG_24_C */
diff --git a/lib/dns/rdata/generic/soa_6.c b/lib/dns/rdata/generic/soa_6.c
index b573a546..6b69bf59 100644
--- a/lib/dns/rdata/generic/soa_6.c
+++ b/lib/dns/rdata/generic/soa_6.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: soa_6.c,v 1.63 2009/02/16 23:48:04 tbox Exp $ */
+/* $Id: soa_6.c,v 1.64 2009/12/04 21:09:34 marka Exp $ */
/* Reviewed: Thu Mar 16 15:18:32 PST 2000 by explorer */
@@ -441,4 +441,9 @@ checknames_soa(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_soa(ARGS_COMPARE) {
+ return (compare_soa(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_SOA_6_C */
diff --git a/lib/dns/rdata/generic/spf_99.c b/lib/dns/rdata/generic/spf_99.c
index 12e813e4..492e315d 100644
--- a/lib/dns/rdata/generic/spf_99.c
+++ b/lib/dns/rdata/generic/spf_99.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: spf_99.c,v 1.4 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: spf_99.c,v 1.6 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Thu Mar 16 15:40:00 PST 2000 by bwelling */
@@ -235,4 +235,8 @@ checknames_spf(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_spf(ARGS_COMPARE) {
+ return (compare_spf(rdata1, rdata2));
+}
#endif /* RDATA_GENERIC_SPF_99_C */
diff --git a/lib/dns/rdata/generic/sshfp_44.c b/lib/dns/rdata/generic/sshfp_44.c
index 570a3b76..6f89a25b 100644
--- a/lib/dns/rdata/generic/sshfp_44.c
+++ b/lib/dns/rdata/generic/sshfp_44.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 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: sshfp_44.c,v 1.7 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: sshfp_44.c,v 1.9 2009/12/04 22:06:37 tbox Exp $ */
/* RFC 4255 */
@@ -259,4 +259,9 @@ checknames_sshfp(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_sshfp(ARGS_COMPARE) {
+ return (compare_sshfp(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_SSHFP_44_C */
diff --git a/lib/dns/rdata/generic/tkey_249.c b/lib/dns/rdata/generic/tkey_249.c
index 2412c85b..580c94f6 100644
--- a/lib/dns/rdata/generic/tkey_249.c
+++ b/lib/dns/rdata/generic/tkey_249.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 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: tkey_249.c,v 1.57 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: tkey_249.c,v 1.59 2009/12/04 22:06:37 tbox Exp $ */
/*
* Reviewed: Thu Mar 16 17:35:30 PST 2000 by halley.
@@ -552,4 +552,8 @@ checknames_tkey(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline isc_result_t
+casecompare_tkey(ARGS_COMPARE) {
+ return (compare_tkey(rdata1, rdata2));
+}
#endif /* RDATA_GENERIC_TKEY_249_C */
diff --git a/lib/dns/rdata/generic/txt_16.c b/lib/dns/rdata/generic/txt_16.c
index a158a597..c49864e6 100644
--- a/lib/dns/rdata/generic/txt_16.c
+++ b/lib/dns/rdata/generic/txt_16.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: txt_16.c,v 1.45 2008/02/15 23:46:51 tbox Exp $ */
+/* $Id: txt_16.c,v 1.47 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Thu Mar 16 15:40:00 PST 2000 by bwelling */
@@ -235,4 +235,9 @@ checknames_txt(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline isc_result_t
+casecompare_txt(ARGS_COMPARE) {
+ return (compare_txt(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_TXT_16_C */
diff --git a/lib/dns/rdata/generic/unspec_103.c b/lib/dns/rdata/generic/unspec_103.c
index 384863e8..c335c675 100644
--- a/lib/dns/rdata/generic/unspec_103.c
+++ b/lib/dns/rdata/generic/unspec_103.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: unspec_103.c,v 1.35 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: unspec_103.c,v 1.37 2009/12/04 22:06:37 tbox Exp $ */
#ifndef RDATA_GENERIC_UNSPEC_103_C
#define RDATA_GENERIC_UNSPEC_103_C
@@ -186,4 +186,9 @@ checknames_unspec(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_unspec(ARGS_COMPARE) {
+ return (compare_unspec(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_UNSPEC_103_C */
diff --git a/lib/dns/rdata/generic/x25_19.c b/lib/dns/rdata/generic/x25_19.c
index c496aafd..6867fecd 100644
--- a/lib/dns/rdata/generic/x25_19.c
+++ b/lib/dns/rdata/generic/x25_19.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: x25_19.c,v 1.39 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: x25_19.c,v 1.41 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Thu Mar 16 16:15:57 PST 2000 by bwelling */
@@ -216,4 +216,9 @@ checknames_x25(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_x25(ARGS_COMPARE) {
+ return (compare_x25(rdata1, rdata2));
+}
+
#endif /* RDATA_GENERIC_X25_19_C */
diff --git a/lib/dns/rdata/hs_4/a_1.c b/lib/dns/rdata/hs_4/a_1.c
index 487e8bc4..50ae25d5 100644
--- a/lib/dns/rdata/hs_4/a_1.c
+++ b/lib/dns/rdata/hs_4/a_1.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: a_1.c,v 1.31 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: a_1.c,v 1.33 2009/12/04 22:06:37 tbox Exp $ */
/* reviewed: Thu Mar 16 15:58:36 PST 2000 by brister */
@@ -229,4 +229,9 @@ checknames_hs_a(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_hs_a(ARGS_COMPARE) {
+ return (compare_hs_a(rdata1, rdata2));
+}
+
#endif /* RDATA_HS_4_A_1_C */
diff --git a/lib/dns/rdata/in_1/a6_38.c b/lib/dns/rdata/in_1/a6_38.c
index d4d42bb3..8619f8a2 100644
--- a/lib/dns/rdata/in_1/a6_38.c
+++ b/lib/dns/rdata/in_1/a6_38.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 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: a6_38.c,v 1.54 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: a6_38.c,v 1.56 2009/12/04 22:06:37 tbox Exp $ */
/* RFC2874 */
@@ -458,4 +458,9 @@ checknames_in_a6(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_in_a6(ARGS_COMPARE) {
+ return (compare_in_a6(rdata1, rdata2));
+}
+
#endif /* RDATA_IN_1_A6_38_C */
diff --git a/lib/dns/rdata/in_1/a_1.c b/lib/dns/rdata/in_1/a_1.c
index d7644bc8..902932e0 100644
--- a/lib/dns/rdata/in_1/a_1.c
+++ b/lib/dns/rdata/in_1/a_1.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: a_1.c,v 1.53 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: a_1.c,v 1.55 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */
@@ -233,4 +233,9 @@ checknames_in_a(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_in_a(ARGS_COMPARE) {
+ return (compare_in_a(rdata1, rdata2));
+}
+
#endif /* RDATA_IN_1_A_1_C */
diff --git a/lib/dns/rdata/in_1/aaaa_28.c b/lib/dns/rdata/in_1/aaaa_28.c
index d0503a94..5aa59b2c 100644
--- a/lib/dns/rdata/in_1/aaaa_28.c
+++ b/lib/dns/rdata/in_1/aaaa_28.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: aaaa_28.c,v 1.45 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: aaaa_28.c,v 1.47 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */
@@ -230,4 +230,8 @@ checknames_in_aaaa(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_in_aaaa(ARGS_COMPARE) {
+ return (compare_in_aaaa(rdata1, rdata2));
+}
#endif /* RDATA_IN_1_AAAA_28_C */
diff --git a/lib/dns/rdata/in_1/apl_42.c b/lib/dns/rdata/in_1/apl_42.c
index 28ca68e5..eb927b92 100644
--- a/lib/dns/rdata/in_1/apl_42.c
+++ b/lib/dns/rdata/in_1/apl_42.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: apl_42.c,v 1.14 2008/01/22 23:28:04 tbox Exp $ */
+/* $Id: apl_42.c,v 1.16 2009/12/04 22:06:37 tbox Exp $ */
/* RFC3123 */
@@ -450,4 +450,9 @@ checknames_in_apl(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_in_apl(ARGS_COMPARE) {
+ return (compare_in_apl(rdata1, rdata2));
+}
+
#endif /* RDATA_IN_1_APL_42_C */
diff --git a/lib/dns/rdata/in_1/dhcid_49.c b/lib/dns/rdata/in_1/dhcid_49.c
index 27c4e4e2..0749272b 100644
--- a/lib/dns/rdata/in_1/dhcid_49.c
+++ b/lib/dns/rdata/in_1/dhcid_49.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2006, 2007, 2009 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 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dhcid_49.c,v 1.5 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: dhcid_49.c,v 1.7 2009/12/04 22:06:37 tbox Exp $ */
/* RFC 4701 */
@@ -51,7 +51,7 @@ totext_in_dhcid(ARGS_TOTEXT) {
dns_rdata_toregion(rdata, &sr);
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
- RETERR(str_totext("( " /*)*/, target));
+ RETERR(str_totext("( " /*)*/, target));
RETERR(isc_base64_totext(&sr, tctx->width - 2, tctx->linebreak,
target));
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) {
@@ -226,4 +226,9 @@ checknames_in_dhcid(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_in_dhcid(ARGS_COMPARE) {
+ return (compare_in_dhcid(rdata1, rdata2));
+}
+
#endif /* RDATA_IN_1_DHCID_49_C */
diff --git a/lib/dns/rdata/in_1/kx_36.c b/lib/dns/rdata/in_1/kx_36.c
index 9df2e5ee..fbe3b71d 100644
--- a/lib/dns/rdata/in_1/kx_36.c
+++ b/lib/dns/rdata/in_1/kx_36.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 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: kx_36.c,v 1.45 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: kx_36.c,v 1.47 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Thu Mar 16 17:24:54 PST 2000 by explorer */
@@ -85,7 +85,7 @@ totext_in_kx(ARGS_TOTEXT) {
static inline isc_result_t
fromwire_in_kx(ARGS_FROMWIRE) {
- dns_name_t name;
+ dns_name_t name;
isc_region_t sregion;
REQUIRE(type == 36);
@@ -96,7 +96,7 @@ fromwire_in_kx(ARGS_FROMWIRE) {
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
- dns_name_init(&name, NULL);
+ dns_name_init(&name, NULL);
isc_buffer_activeregion(source, &sregion);
if (sregion.length < 2)
@@ -285,4 +285,9 @@ checknames_in_kx(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_in_kx(ARGS_COMPARE) {
+ return (compare_in_kx(rdata1, rdata2));
+}
+
#endif /* RDATA_IN_1_KX_36_C */
diff --git a/lib/dns/rdata/in_1/naptr_35.c b/lib/dns/rdata/in_1/naptr_35.c
index a9e1e899..ce7804b2 100644
--- a/lib/dns/rdata/in_1/naptr_35.c
+++ b/lib/dns/rdata/in_1/naptr_35.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: naptr_35.c,v 1.55 2009/01/21 23:47:27 tbox Exp $ */
+/* $Id: naptr_35.c,v 1.56 2009/12/04 21:09:34 marka Exp $ */
/* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */
@@ -702,4 +702,9 @@ checknames_in_naptr(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_in_naptr(ARGS_COMPARE) {
+ return (compare_in_naptr(rdata1, rdata2));
+}
+
#endif /* RDATA_IN_1_NAPTR_35_C */
diff --git a/lib/dns/rdata/in_1/nsap-ptr_23.c b/lib/dns/rdata/in_1/nsap-ptr_23.c
index 2da78695..78df645a 100644
--- a/lib/dns/rdata/in_1/nsap-ptr_23.c
+++ b/lib/dns/rdata/in_1/nsap-ptr_23.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nsap-ptr_23.c,v 1.38 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: nsap-ptr_23.c,v 1.40 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Fri Mar 17 10:16:02 PST 2000 by gson */
@@ -73,7 +73,7 @@ totext_in_nsap_ptr(ARGS_TOTEXT) {
static inline isc_result_t
fromwire_in_nsap_ptr(ARGS_FROMWIRE) {
- dns_name_t name;
+ dns_name_t name;
REQUIRE(type == 23);
REQUIRE(rdclass == 1);
@@ -83,8 +83,8 @@ fromwire_in_nsap_ptr(ARGS_FROMWIRE) {
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
- dns_name_init(&name, NULL);
- return (dns_name_fromwire(&name, source, dctx, options, target));
+ dns_name_init(&name, NULL);
+ return (dns_name_fromwire(&name, source, dctx, options, target));
}
static inline isc_result_t
@@ -242,4 +242,9 @@ checknames_in_nsap_ptr(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_in_nsap_ptr(ARGS_COMPARE) {
+ return (compare_in_nsap_ptr(rdata1, rdata2));
+}
+
#endif /* RDATA_IN_1_NSAP_PTR_23_C */
diff --git a/lib/dns/rdata/in_1/nsap_22.c b/lib/dns/rdata/in_1/nsap_22.c
index c25f5608..d762fe1d 100644
--- a/lib/dns/rdata/in_1/nsap_22.c
+++ b/lib/dns/rdata/in_1/nsap_22.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nsap_22.c,v 1.42 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: nsap_22.c,v 1.44 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Fri Mar 17 10:41:07 PST 2000 by gson */
@@ -252,4 +252,9 @@ checknames_in_nsap(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_in_nsap(ARGS_COMPARE) {
+ return (compare_in_nsap(rdata1, rdata2));
+}
+
#endif /* RDATA_IN_1_NSAP_22_C */
diff --git a/lib/dns/rdata/in_1/px_26.c b/lib/dns/rdata/in_1/px_26.c
index 1d17f2f0..a4111ad5 100644
--- a/lib/dns/rdata/in_1/px_26.c
+++ b/lib/dns/rdata/in_1/px_26.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 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: px_26.c,v 1.43 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: px_26.c,v 1.45 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Mon Mar 20 10:44:27 PST 2000 */
@@ -115,7 +115,7 @@ totext_in_px(ARGS_TOTEXT) {
static inline isc_result_t
fromwire_in_px(ARGS_FROMWIRE) {
- dns_name_t name;
+ dns_name_t name;
isc_region_t sregion;
REQUIRE(type == 26);
@@ -126,7 +126,7 @@ fromwire_in_px(ARGS_FROMWIRE) {
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
- dns_name_init(&name, NULL);
+ dns_name_init(&name, NULL);
/*
* Preference.
@@ -371,4 +371,9 @@ checknames_in_px(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_in_px(ARGS_COMPARE) {
+ return (compare_in_px(rdata1, rdata2));
+}
+
#endif /* RDATA_IN_1_PX_26_C */
diff --git a/lib/dns/rdata/in_1/srv_33.c b/lib/dns/rdata/in_1/srv_33.c
index 7bc85cda..ea4f3edb 100644
--- a/lib/dns/rdata/in_1/srv_33.c
+++ b/lib/dns/rdata/in_1/srv_33.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 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: srv_33.c,v 1.45 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: srv_33.c,v 1.47 2009/12/04 22:06:37 tbox Exp $ */
/* Reviewed: Fri Mar 17 13:01:00 PST 2000 by bwelling */
@@ -140,7 +140,7 @@ totext_in_srv(ARGS_TOTEXT) {
static inline isc_result_t
fromwire_in_srv(ARGS_FROMWIRE) {
- dns_name_t name;
+ dns_name_t name;
isc_region_t sr;
REQUIRE(type == 33);
@@ -151,7 +151,7 @@ fromwire_in_srv(ARGS_FROMWIRE) {
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
- dns_name_init(&name, NULL);
+ dns_name_init(&name, NULL);
/*
* Priority, weight, port.
@@ -370,4 +370,9 @@ checknames_in_srv(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_in_srv(ARGS_COMPARE) {
+ return (compare_in_srv(rdata1, rdata2));
+}
+
#endif /* RDATA_IN_1_SRV_33_C */
diff --git a/lib/dns/rdata/in_1/wks_11.c b/lib/dns/rdata/in_1/wks_11.c
index 19bad0af..23914295 100644
--- a/lib/dns/rdata/in_1/wks_11.c
+++ b/lib/dns/rdata/in_1/wks_11.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: wks_11.c,v 1.56 2009/02/16 23:48:04 tbox Exp $ */
+/* $Id: wks_11.c,v 1.57 2009/12/04 21:09:34 marka Exp $ */
/* Reviewed: Fri Mar 17 15:01:49 PST 2000 by explorer */
@@ -348,4 +348,9 @@ checknames_in_wks(ARGS_CHECKNAMES) {
return (ISC_TRUE);
}
+static inline int
+casecompare_in_wks(ARGS_COMPARE) {
+ return (compare_in_wks(rdata1, rdata2));
+}
+
#endif /* RDATA_IN_1_WKS_11_C */
diff --git a/lib/dns/view.c b/lib/dns/view.c
index e9185cf8..6850f2f5 100644
--- a/lib/dns/view.c
+++ b/lib/dns/view.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: view.c,v 1.158 2009/11/12 23:30:36 marka Exp $ */
+/* $Id: view.c,v 1.159 2009/11/28 15:57:37 vjs Exp $ */
/*! \file */
@@ -177,6 +177,9 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
view->flush = ISC_FALSE;
view->dlv = NULL;
view->maxudp = 0;
+#ifdef ALLOW_FILTER_AAAA_ON_V4
+ view->v4_aaaa = dns_v4_aaaa_ok;
+#endif
dns_fixedname_init(&view->dlv_fixed);
#ifdef BIND9
diff --git a/lib/dns/win32/libdns.def b/lib/dns/win32/libdns.def
index 12e6e6ff..54792028 100644
--- a/lib/dns/win32/libdns.def
+++ b/lib/dns/win32/libdns.def
@@ -236,10 +236,15 @@ dns_journal_writediff
dns_keydata_fromdnskey
dns_keydata_todnskey
dns_keyflags_fromtext
+dns_keynode_attach
+dns_keynode_detach
+dns_keynode_detachall
+dns_keynode_create
dns_keynode_key
dns_keynode_managed
dns_keytable_add
dns_keytable_attach
+dns_keytable_attachkeynode
dns_keytable_create
dns_keytable_delete
dns_keytable_deletekeynode
@@ -464,6 +469,7 @@ dns_rbtnodechain_reset
dns_rcode_fromtext
dns_rcode_totext
dns_rdata_additionaldata
+dns_rdata_casecompare
dns_rdata_checkowner
dns_rdata_clone
dns_rdata_compare
@@ -772,6 +778,7 @@ dns_zone_name
dns_zone_next
dns_zone_notify
dns_zone_notifyreceive
+dns_zone_nscheck
dns_zone_refresh
dns_zone_replacedb
dns_zone_rekey
diff --git a/lib/dns/zone.c b/lib/dns/zone.c
index a398ab45..19f0546b 100644
--- a/lib/dns/zone.c
+++ b/lib/dns/zone.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zone.c,v 1.532 2009/11/24 03:42:32 each Exp $ */
+/* $Id: zone.c,v 1.540 2009/12/07 20:51:12 each Exp $ */
/*! \file */
@@ -365,6 +365,7 @@ struct dns_zone {
#define DNS_ZONEFLG_NEEDCOMPACT 0x02000000U
#define DNS_ZONEFLG_REFRESHING 0x04000000U /*%< Refreshing keydata */
#define DNS_ZONEFLG_THAW 0x08000000U
+#define DNS_ZONEFLG_NOTIFYRESIGN 0x10000000U
#define DNS_ZONE_OPTION(z,o) (((z)->options & (o)) != 0)
#define DNS_ZONEKEY_OPTION(z,o) (((z)->keyopts & (o)) != 0)
@@ -2022,6 +2023,113 @@ zone_check_glue(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
}
static isc_boolean_t
+zone_rrset_check_dup(dns_zone_t *zone, dns_name_t *owner,
+ dns_rdataset_t *rdataset)
+{
+ dns_rdataset_t tmprdataset;
+ isc_result_t result;
+ isc_boolean_t answer = ISC_TRUE;
+ isc_boolean_t format = ISC_TRUE;
+ int level = ISC_LOG_WARNING;
+ char ownerbuf[DNS_NAME_FORMATSIZE];
+ char typebuf[DNS_RDATATYPE_FORMATSIZE];
+ unsigned int count1 = 0;
+
+ if (DNS_ZONE_OPTION(zone, DNS_ZONEOPT_CHECKDUPRRFAIL))
+ level = ISC_LOG_ERROR;
+
+ dns_rdataset_init(&tmprdataset);
+ for (result = dns_rdataset_first(rdataset);
+ result == ISC_R_SUCCESS;
+ result = dns_rdataset_next(rdataset)) {
+ dns_rdata_t rdata1 = DNS_RDATA_INIT;
+ unsigned int count2 = 0;
+
+ count1++;
+ dns_rdataset_current(rdataset, &rdata1);
+ dns_rdataset_clone(rdataset, &tmprdataset);
+ for (result = dns_rdataset_first(&tmprdataset);
+ result == ISC_R_SUCCESS;
+ result = dns_rdataset_next(&tmprdataset)) {
+ dns_rdata_t rdata2 = DNS_RDATA_INIT;
+ count2++;
+ if (count1 >= count2)
+ continue;
+ dns_rdataset_current(&tmprdataset, &rdata2);
+ if (dns_rdata_casecompare(&rdata1, &rdata2) == 0) {
+ if (format) {
+ dns_name_format(owner, ownerbuf,
+ sizeof ownerbuf);
+ dns_rdatatype_format(rdata1.type,
+ typebuf,
+ sizeof(typebuf));
+ format = ISC_FALSE;
+ }
+ dns_zone_log(zone, level, "%s/%s has "
+ "semantically identical records",
+ ownerbuf, typebuf);
+ if (level == ISC_LOG_ERROR)
+ answer = ISC_FALSE;
+ break;
+ }
+ }
+ dns_rdataset_disassociate(&tmprdataset);
+ if (!format)
+ break;
+ }
+ return (answer);
+}
+
+static isc_boolean_t
+zone_check_dup(dns_zone_t *zone, dns_db_t *db) {
+ dns_dbiterator_t *dbiterator = NULL;
+ dns_dbnode_t *node = NULL;
+ dns_fixedname_t fixed;
+ dns_name_t *name;
+ dns_rdataset_t rdataset;
+ dns_rdatasetiter_t *rdsit = NULL;
+ isc_boolean_t ok = ISC_TRUE;
+ isc_result_t result;
+
+ dns_fixedname_init(&fixed);
+ name = dns_fixedname_name(&fixed);
+ dns_rdataset_init(&rdataset);
+
+ result = dns_db_createiterator(db, 0, &dbiterator);
+ if (result != ISC_R_SUCCESS)
+ return (ISC_TRUE);
+
+ for (result = dns_dbiterator_first(dbiterator);
+ result == ISC_R_SUCCESS;
+ result = dns_dbiterator_next(dbiterator)) {
+ result = dns_dbiterator_current(dbiterator, &node, name);
+ if (result != ISC_R_SUCCESS)
+ continue;
+
+ result = dns_db_allrdatasets(db, node, NULL, 0, &rdsit);
+ if (result != ISC_R_SUCCESS)
+ continue;
+
+ for (result = dns_rdatasetiter_first(rdsit);
+ result == ISC_R_SUCCESS;
+ result = dns_rdatasetiter_next(rdsit)) {
+ dns_rdatasetiter_current(rdsit, &rdataset);
+ if (!zone_rrset_check_dup(zone, name, &rdataset))
+ ok = ISC_FALSE;
+ dns_rdataset_disassociate(&rdataset);
+ }
+ dns_rdatasetiter_destroy(&rdsit);
+ dns_db_detachnode(db, &node);
+ }
+
+ if (node != NULL)
+ dns_db_detachnode(db, &node);
+ dns_dbiterator_destroy(&dbiterator);
+
+ return (ok);
+}
+
+static isc_boolean_t
integrity_checks(dns_zone_t *zone, dns_db_t *db) {
dns_dbiterator_t *dbiterator = NULL;
dns_dbnode_t *node = NULL;
@@ -2088,6 +2196,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) {
result = dns_rdataset_next(&rdataset);
}
dns_rdataset_disassociate(&rdataset);
+ goto next;
checkmx:
result = dns_db_findrdataset(db, node, NULL, dns_rdatatype_mx,
@@ -2574,8 +2683,8 @@ set_refreshkeytimer(dns_zone_t *zone, dns_rdata_keydata_t *key,
*/
static isc_result_t
create_keydata(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
- dns_diff_t *diff, dns_name_t *name, dns_keytable_t *keytable,
- dns_keynode_t *keynode, isc_boolean_t *changed)
+ dns_diff_t *diff, dns_keytable_t *keytable,
+ dns_keynode_t **keynodep, isc_boolean_t *changed)
{
const char me[] = "create_keydata";
isc_result_t result = ISC_R_SUCCESS;
@@ -2584,16 +2693,21 @@ create_keydata(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
dns_rdata_keydata_t keydata;
dns_rdata_dnskey_t dnskey;
dns_rdata_t rdata = DNS_RDATA_INIT;
- dns_keynode_t *nextnode = NULL;
+ dns_keynode_t *keynode;
isc_stdtime_t now;
isc_region_t r;
dst_key_t *key;
+ REQUIRE(keynodep != NULL);
+ keynode = *keynodep;
+
ENTER;
isc_stdtime_get(&now);
/* Loop in case there's more than one key. */
while (result == ISC_R_SUCCESS) {
+ dns_keynode_t *nextnode = NULL;
+
key = dns_keynode_key(keynode);
if (key == NULL)
goto skip;
@@ -2621,12 +2735,12 @@ create_keydata(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
/* Add rdata to zone. */
CHECK(update_one_rr(db, ver, diff, DNS_DIFFOP_ADD,
- name, 0, &rdata));
+ dst_key_name(key), 0, &rdata));
*changed = ISC_TRUE;
skip:
result = dns_keytable_nextkeynode(keytable, keynode, &nextnode);
- if(result != ISC_R_NOTFOUND) {
+ if (result != ISC_R_NOTFOUND) {
dns_keytable_detachkeynode(keytable, &keynode);
keynode = nextnode;
}
@@ -2636,6 +2750,10 @@ create_keydata(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
if (*changed)
set_refreshkeytimer(zone, &keydata, now);
+ if (keynode != NULL)
+ dns_keytable_detachkeynode(keytable, &keynode);
+ *keynodep = NULL;
+
return (ISC_R_SUCCESS);
failure:
@@ -3099,12 +3217,12 @@ sync_keyzone(dns_zone_t *zone, dns_db_t *db) {
continue;
result = dns_keytable_find(sr, rrname, &keynode);
-
if ((result != ISC_R_SUCCESS &&
result != DNS_R_PARTIALMATCH) ||
dns_keynode_managed(keynode) == ISC_FALSE) {
CHECK(delete_keydata(db, ver, &diff,
rrname, rdataset));
+ changed = ISC_TRUE;
} else {
load_secroots(zone, rrname, rdataset);
}
@@ -3127,10 +3245,10 @@ sync_keyzone(dns_zone_t *zone, dns_db_t *db) {
dns_rbtnode_t *rbtnode = NULL;
dns_rbtnodechain_current(&chain, &foundname, origin, &rbtnode);
- keynode = rbtnode->data;
- if (keynode == NULL)
+ if (rbtnode->data == NULL)
goto skip;
+ dns_keytable_attachkeynode(sr, rbtnode->data, &keynode);
if (dns_keynode_managed(keynode)) {
dns_fixedname_t fname;
dns_name_t *keyname;
@@ -3149,13 +3267,14 @@ sync_keyzone(dns_zone_t *zone, dns_db_t *db) {
NULL, NULL);
if (result != ISC_R_SUCCESS)
result = create_keydata(zone, db, ver, &diff,
- keyname, sr, keynode,
- &changed);
+ sr, &keynode, &changed);
if (result != ISC_R_SUCCESS)
break;
}
skip:
result = dns_rbtnodechain_next(&chain, &foundname, origin);
+ if (keynode != NULL)
+ dns_keytable_detachkeynode(sr, &keynode);
}
RWUNLOCK(&sr->rwlock, isc_rwlocktype_write);
@@ -3173,6 +3292,8 @@ sync_keyzone(dns_zone_t *zone, dns_db_t *db) {
}
failure:
+ if (keynode != NULL)
+ dns_keytable_detachkeynode(sr, &keynode);
if (sr != NULL)
dns_keytable_detach(&sr);
if (ver != NULL)
@@ -3337,6 +3458,13 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
goto cleanup;
}
+ if (zone->type == dns_zone_master &&
+ DNS_ZONE_OPTION(zone, DNS_ZONEOPT_CHECKDUPRR) &&
+ !zone_check_dup(zone, db)) {
+ result = DNS_R_BADZONE;
+ goto cleanup;
+ }
+
if (zone->db != NULL) {
/*
* This is checked in zone_replacedb() for slave zones
@@ -3528,7 +3656,9 @@ exit_check(dns_zone_t *zone) {
}
static isc_boolean_t
-zone_check_ns(dns_zone_t *zone, dns_db_t *db, dns_name_t *name) {
+zone_check_ns(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
+ isc_boolean_t logit)
+{
isc_result_t result;
char namebuf[DNS_NAME_FORMATSIZE];
char altbuf[DNS_NAME_FORMATSIZE];
@@ -3559,30 +3689,33 @@ zone_check_ns(dns_zone_t *zone, dns_db_t *db, dns_name_t *name) {
return (ISC_TRUE);
}
- dns_name_format(name, namebuf, sizeof namebuf);
if (result == DNS_R_NXRRSET || result == DNS_R_NXDOMAIN ||
result == DNS_R_EMPTYNAME) {
- dns_zone_log(zone, level,
- "NS '%s' has no address records (A or AAAA)",
- namebuf);
- /* XXX950 Make fatal ISC_FALSE for 9.5.0. */
- return (ISC_TRUE);
+ if (logit) {
+ dns_name_format(name, namebuf, sizeof namebuf);
+ dns_zone_log(zone, level, "NS '%s' has no address "
+ "records (A or AAAA)", namebuf);
+ }
+ return (ISC_FALSE);
}
if (result == DNS_R_CNAME) {
- dns_zone_log(zone, level, "NS '%s' is a CNAME (illegal)",
- namebuf);
- /* XXX950 Make fatal ISC_FALSE for 9.5.0. */
- return (ISC_TRUE);
+ if (logit) {
+ dns_name_format(name, namebuf, sizeof namebuf);
+ dns_zone_log(zone, level, "NS '%s' is a CNAME "
+ "(illegal)", namebuf);
+ }
+ return (ISC_FALSE);
}
if (result == DNS_R_DNAME) {
- dns_name_format(foundname, altbuf, sizeof altbuf);
- dns_zone_log(zone, level,
- "NS '%s' is below a DNAME '%s' (illegal)",
- namebuf, altbuf);
- /* XXX950 Make fatal ISC_FALSE for 9.5.0. */
- return (ISC_TRUE);
+ if (logit) {
+ dns_name_format(name, namebuf, sizeof namebuf);
+ dns_name_format(foundname, altbuf, sizeof altbuf);
+ dns_zone_log(zone, level, "NS '%s' is below a DNAME "
+ "'%s' (illegal)", namebuf, altbuf);
+ }
+ return (ISC_FALSE);
}
return (ISC_TRUE);
@@ -3591,7 +3724,7 @@ zone_check_ns(dns_zone_t *zone, dns_db_t *db, dns_name_t *name) {
static isc_result_t
zone_count_ns_rr(dns_zone_t *zone, dns_db_t *db, dns_dbnode_t *node,
dns_dbversion_t *version, unsigned int *nscount,
- unsigned int *errors)
+ unsigned int *errors, isc_boolean_t logit)
{
isc_result_t result;
unsigned int count = 0;
@@ -3622,7 +3755,7 @@ zone_count_ns_rr(dns_zone_t *zone, dns_db_t *db, dns_dbnode_t *node,
result = dns_rdata_tostruct(&rdata, &ns, NULL);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
if (dns_name_issubdomain(&ns.name, &zone->origin) &&
- !zone_check_ns(zone, db, &ns.name))
+ !zone_check_ns(zone, db, &ns.name, logit))
ecount++;
}
count++;
@@ -3751,7 +3884,7 @@ zone_get_from_db(dns_zone_t *zone, dns_db_t *db, unsigned int *nscount,
if (nscount != NULL || errors != NULL) {
result = zone_count_ns_rr(zone, db, node, version,
- nscount, errors);
+ nscount, errors, ISC_TRUE);
if (result != ISC_R_SUCCESS)
answer = result;
}
@@ -6350,6 +6483,7 @@ zone_sign(dns_zone_t *zone) {
unsigned int nkeys = 0;
isc_uint32_t nodes;
isc_boolean_t was_ksk;
+ isc_time_t when;
dns_rdataset_init(&rdataset);
dns_fixedname_init(&fixed);
@@ -6704,6 +6838,17 @@ zone_sign(dns_zone_t *zone) {
*/
zone_journal(zone, &sig_diff, "zone_sign");
+ /*
+ * Notify slaves, if appropriate.
+ */
+ TIME_NOW(&when);
+ if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NOTIFYRESIGN)) {
+ LOCK_ZONE(zone);
+ DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NOTIFYRESIGN);
+ UNLOCK_ZONE(zone);
+ zone_notify(zone, &when);
+ }
+
pauseall:
/*
* Pause all iterators so that dns_db_closeversion() can succeed.
@@ -7452,7 +7597,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
}
dns_diff_clear(&diff);
- dns_db_closeversion(kfetch->db, &ver, alldone);
+ dns_db_closeversion(kfetch->db, &ver, changed);
dns_db_detach(&kfetch->db);
if (dns_rdataset_isassociated(&kfetch->keydataset))
@@ -13437,6 +13582,53 @@ add_signing_records(dns_db_t *db, dns_rdatatype_t privatetype,
return (result);
}
+static void
+sign_dnskey(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
+ dns_diff_t *diff)
+{
+ isc_result_t result;
+ isc_stdtime_t now, inception, soaexpire;
+ isc_boolean_t check_ksk, keyset_kskonly;
+ dst_key_t *zone_keys[MAXZONEKEYS];
+ unsigned int nkeys = 0, i;
+
+ result = find_zone_keys(zone, db, ver, zone->mctx, MAXZONEKEYS,
+ zone_keys, &nkeys);
+ if (result != ISC_R_SUCCESS) {
+ dns_zone_log(zone, ISC_LOG_ERROR,
+ "sign_dnskey:find_zone_keys -> %s\n",
+ dns_result_totext(result));
+ return;
+ }
+
+ isc_stdtime_get(&now);
+ inception = now - 3600; /* Allow for clock skew. */
+ soaexpire = now + dns_zone_getsigvalidityinterval(zone);
+
+ check_ksk = DNS_ZONE_OPTION(zone, DNS_ZONEOPT_UPDATECHECKKSK);
+ keyset_kskonly = DNS_ZONE_OPTION(zone, DNS_ZONEOPT_DNSKEYKSKONLY);
+
+ result = del_sigs(zone, db, ver, &zone->origin, dns_rdatatype_dnskey,
+ diff, zone_keys, nkeys, now);
+ if (result != ISC_R_SUCCESS) {
+ dns_zone_log(zone, ISC_LOG_ERROR,
+ "sign_dnskey:del_sigs -> %s\n",
+ dns_result_totext(result));
+ goto failure;
+ }
+
+ result = add_sigs(db, ver, &zone->origin, dns_rdatatype_dnskey, diff,
+ zone_keys, nkeys, zone->mctx, inception, soaexpire,
+ check_ksk, keyset_kskonly);
+
+ if (result != ISC_R_SUCCESS)
+ dns_zone_log(zone, ISC_LOG_ERROR, "zone_rekey:add_sigs -> %s\n",
+ dns_result_totext(result));
+ failure:
+ for (i = 0; i < nkeys; i++)
+ dst_key_free(&zone_keys[i]);
+}
+
static isc_result_t
zone_rekey(dns_zone_t *zone) {
isc_result_t result;
@@ -13471,6 +13663,8 @@ zone_rekey(dns_zone_t *zone) {
CHECK(dns_db_newversion(db, &ver));
CHECK(dns_db_getoriginnode(db, &node));
+ dns_zone_log(zone, ISC_LOG_INFO, "reconfiguring zone keys");
+
/* Get the SOA record's TTL */
CHECK(dns_db_findrdataset(db, node, ver, dns_rdatatype_soa,
dns_rdatatype_none, 0, &soaset, &soasigs));
@@ -13500,18 +13694,20 @@ zone_rekey(dns_zone_t *zone) {
ISC_TF(!check_ksk), mctx, logmsg));
if (!ISC_LIST_EMPTY(diff.tuples)) {
commit = ISC_TRUE;
- add_signing_records(db, zone->privatetype, ver, &diff);
dns_diff_apply(&diff, db, ver);
+ sign_dnskey(zone, db, ver, &diff);
+ add_signing_records(db, zone->privatetype, ver, &diff);
result = increment_soa_serial(db, ver, &diff, mctx);
if (result == ISC_R_SUCCESS)
zone_journal(zone, &diff, "zone_rekey");
-
}
}
dns_db_closeversion(db, &ver, commit);
if (commit) {
+ DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NOTIFYRESIGN);
+
for (key = ISC_LIST_HEAD(rmkeys);
key != NULL;
key = ISC_LIST_NEXT(key, link)) {
@@ -13594,3 +13790,22 @@ dns_zone_rekey(dns_zone_t *zone) {
UNLOCK_ZONE(zone);
return (result);
}
+
+isc_result_t
+dns_zone_nscheck(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version,
+ unsigned int *errors)
+{
+ isc_result_t result;
+ dns_dbnode_t *node = NULL;
+
+ REQUIRE(DNS_ZONE_VALID(zone));
+ REQUIRE(errors != NULL);
+
+ result = dns_db_getoriginnode(db, &node);
+ if (result != ISC_R_SUCCESS)
+ return (result);
+ result = zone_count_ns_rr(zone, db, node, version, NULL, errors,
+ ISC_FALSE);
+ dns_db_detachnode(db, &node);
+ return (result);
+}
diff --git a/lib/export/dns/Makefile.in b/lib/export/dns/Makefile.in
index 9d0cce2e..7445e303 100644
--- a/lib/export/dns/Makefile.in
+++ b/lib/export/dns/Makefile.in
@@ -12,10 +12,11 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.3 2009/09/02 23:48:02 tbox Exp $
+# $Id: Makefile.in,v 1.4 2009/12/05 23:31:40 each Exp $
top_srcdir = @top_srcdir@
srcdir = @top_srcdir@/lib/dns
+export_srcdir = @top_srcdir@/lib/export
# Attempt to disable parallel processing.
.NOTPARALLEL:
@@ -27,7 +28,7 @@ srcdir = @top_srcdir@/lib/dns
@BIND9_MAKE_INCLUDES@
-CINCLUDES = -I. -Iinclude ${DNS_INCLUDES} \
+CINCLUDES = -I. -Iinclude ${DNS_INCLUDES} -I${export_srcdir}/isc/include \
${ISC_INCLUDES} @DST_OPENSSL_INC@ @DST_GSSAPI_INC@
CDEFINES = -DUSE_MD5 @USE_OPENSSL@ @USE_GSSAPI@
diff --git a/lib/export/irs/Makefile.in b/lib/export/irs/Makefile.in
index 2cdc5818..58a9b212 100644
--- a/lib/export/irs/Makefile.in
+++ b/lib/export/irs/Makefile.in
@@ -12,10 +12,11 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.3 2009/09/02 23:48:02 tbox Exp $
+# $Id: Makefile.in,v 1.4 2009/12/05 23:31:40 each Exp $
top_srcdir = @top_srcdir@
srcdir = @top_srcdir@/lib/irs
+export_srcdir = @top_srcdir@/lib/export
@BIND9_VERSION@
@@ -25,7 +26,7 @@ srcdir = @top_srcdir@/lib/irs
CINCLUDES = -I. -I./include -I${srcdir}/include \
${ISCCFG_INCLUDES} -I../dns/include ${DNS_INCLUDES} \
- ${ISC_INCLUDES}
+ -I${export_srcdir}/isc/include ${ISC_INCLUDES}
CDEFINES =
CWARNINGS =
diff --git a/lib/export/isc/Makefile.in b/lib/export/isc/Makefile.in
index 52f6b37b..ca199818 100644
--- a/lib/export/isc/Makefile.in
+++ b/lib/export/isc/Makefile.in
@@ -12,10 +12,11 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.4 2009/09/03 20:28:46 each Exp $
+# $Id: Makefile.in,v 1.5 2009/12/05 23:31:41 each Exp $
top_srcdir = @top_srcdir@
srcdir = @top_srcdir@/lib/isc
+export_srcdir = @top_srcdir@/lib/export
@BIND9_VERSION@
@@ -24,7 +25,8 @@ srcdir = @top_srcdir@/lib/isc
CINCLUDES = -I${srcdir}/unix/include \
-I${srcdir}/@ISC_THREAD_DIR@/include \
-I${srcdir}/@ISC_ARCH_DIR@/include \
- -I${srcdir}/include @ISC_OPENSSL_INC@
+ -I${export_srcdir}/isc/include -I${srcdir}/include \
+ @ISC_OPENSSL_INC@
CDEFINES = @USE_OPENSSL@ -DUSE_APPIMPREGISTER -DUSE_MEMIMPREGISTER \
-DUSE_SOCKETIMPREGISTER -DUSE_TASKIMPREGISTER \
-DUSE_TIMERIMPREGISTER
diff --git a/lib/export/isc/include/isc/Makefile.in b/lib/export/isc/include/isc/Makefile.in
index 1e0ff001..24991853 100644
--- a/lib/export/isc/include/isc/Makefile.in
+++ b/lib/export/isc/include/isc/Makefile.in
@@ -12,10 +12,11 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.2 2009/09/01 00:22:27 jinmei Exp $
+# $Id: Makefile.in,v 1.3 2009/12/05 23:31:41 each Exp $
srcdir = @srcdir@
top_srcdir = @top_srcdir@
+export_srcdir = @top_srcdir@/lib/export
@BIND9_VERSION@
@@ -24,8 +25,8 @@ top_srcdir = @top_srcdir@
# machine generated. The latter are handled specially in the
# install target below.
#
-HEADERS = app.h assertions.h base64.h bitstring.h boolean.h buffer.h \
- bufferlist.h commandline.h entropy.h error.h event.h \
+HEADERS = app.h assertions.h base64.h bitstring.h boolean.h \
+ buffer.h bufferlist.h commandline.h entropy.h error.h event.h \
eventclass.h file.h formatcheck.h fsaccess.h \
hash.h heap.h hex.h hmacmd5.h \
httpd.h \
@@ -58,6 +59,8 @@ install:: installdirs
${DESTDIR}${export_includedir}/isc
${INSTALL_DATA} ${top_srcdir}/lib/isc/@ISC_ARCH_DIR@/include/isc/atomic.h \
${DESTDIR}${export_includedir}/isc
+ ${INSTALL_DATA} ${export_srcdir}/isc/include/isc/bind9.h \
+ ${DESTDIR}${export_includedir}/isc
distclean::
rm -f platform.h
diff --git a/lib/export/isc/include/isc/bind9.h b/lib/export/isc/include/isc/bind9.h
new file mode 100644
index 00000000..e96789b6
--- /dev/null
+++ b/lib/export/isc/include/isc/bind9.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2009 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
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: bind9.h,v 1.2 2009/12/05 23:31:41 each Exp $ */
+
+#ifndef ISC_BIND9_H
+#define ISC_BIND9_H 1
+
+/*
+ * This determines whether we are building BIND9 or using the exported
+ * libisc/libdns libraries. The version of this file included in the
+ * standard BIND9 build defines BIND9; the version included with the
+ * exportable libraries does not.
+ */
+#undef BIND9
+
+#endif /* ISC_BIND9_H */
diff --git a/lib/export/isccfg/Makefile.in b/lib/export/isccfg/Makefile.in
index d15b6433..c5bd9973 100644
--- a/lib/export/isccfg/Makefile.in
+++ b/lib/export/isccfg/Makefile.in
@@ -12,10 +12,11 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.3 2009/09/02 23:48:02 tbox Exp $
+# $Id: Makefile.in,v 1.4 2009/12/05 23:31:41 each Exp $
top_srcdir = @top_srcdir@
srcdir = @top_srcdir@/lib/isccfg
+export_srcdir = @top_srcdir@/lib/export
@BIND9_VERSION@
@@ -23,7 +24,8 @@ srcdir = @top_srcdir@/lib/isccfg
@BIND9_MAKE_INCLUDES@
-CINCLUDES = -I. ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES}
+CINCLUDES = -I. ${DNS_INCLUDES} -I${export_srcdir}/isc/include \
+ ${ISC_INCLUDES} ${ISCCFG_INCLUDES}
CDEFINES =
CWARNINGS =
diff --git a/lib/export/samples/Makefile.in b/lib/export/samples/Makefile.in
index 4ab0286c..c60baac5 100644
--- a/lib/export/samples/Makefile.in
+++ b/lib/export/samples/Makefile.in
@@ -12,16 +12,18 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.3 2009/09/02 23:48:02 tbox Exp $
+# $Id: Makefile.in,v 1.4 2009/12/05 23:31:41 each Exp $
srcdir = @srcdir@
top_srcdir = @top_srcdir@
+export_srcdir = @top_srcdir@/lib/export
@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
CINCLUDES = -I${srcdir}/include -I../dns/include \
+ -I${export_srcdir}/isc/include \
${DNS_INCLUDES} ${ISC_INCLUDES} \
-I${top_srcdir}/lib/irs/include
diff --git a/lib/isc/Makefile.in b/lib/isc/Makefile.in
index 15f5a7dc..614b3d9f 100644
--- a/lib/isc/Makefile.in
+++ b/lib/isc/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.103 2009/09/04 18:13:44 jinmei Exp $
+# $Id: Makefile.in,v 1.104 2009/12/05 23:31:41 each Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -28,7 +28,7 @@ CINCLUDES = -I${srcdir}/unix/include \
-I${srcdir}/@ISC_ARCH_DIR@/include \
-I./include \
-I${srcdir}/include @ISC_OPENSSL_INC@
-CDEFINES = -DBIND9 @USE_OPENSSL@
+CDEFINES = @USE_OPENSSL@
CWARNINGS =
# Alphabetically
diff --git a/lib/isc/api b/lib/isc/api
index ba292fc6..25bcb673 100644
--- a/lib/isc/api
+++ b/lib/isc/api
@@ -1,3 +1,3 @@
LIBINTERFACE = 61
-LIBREVISION = 1
+LIBREVISION = 2
LIBAGE = 1
diff --git a/lib/isc/include/isc/Makefile.in b/lib/isc/include/isc/Makefile.in
index b3eb2b4c..a4b117ce 100644
--- a/lib/isc/include/isc/Makefile.in
+++ b/lib/isc/include/isc/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.66 2009/02/12 23:47:56 tbox Exp $
+# $Id: Makefile.in,v 1.68 2009/12/05 23:31:41 each Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -26,15 +26,15 @@ top_srcdir = @top_srcdir@
# machine generated. The latter are handled specially in the
# install target below.
#
-HEADERS = app.h assertions.h base64.h bitstring.h boolean.h buffer.h \
- bufferlist.h commandline.h entropy.h error.h event.h \
+HEADERS = app.h assertions.h base64.h bind9.h bitstring.h boolean.h \
+ buffer.h bufferlist.h commandline.h entropy.h error.h event.h \
eventclass.h file.h formatcheck.h fsaccess.h \
hash.h heap.h hex.h hmacmd5.h \
httpd.h \
interfaceiter.h @ISC_IPV6_H@ iterated_hash.h lang.h lex.h \
lfsr.h lib.h list.h log.h \
- magic.h md5.h mem.h msgcat.h msgs.h \
- mutexblock.h netaddr.h ondestroy.h os.h parseint.h \
+ magic.h md5.h mem.h msgcat.h msgs.h mutexblock.h \
+ namespace.h netaddr.h ondestroy.h os.h parseint.h \
print.h quota.h radix.h random.h ratelimiter.h \
refcount.h region.h resource.h \
result.h resultclass.h rwlock.h serial.h sha1.h sha2.h \
diff --git a/lib/isc/include/isc/bind9.h b/lib/isc/include/isc/bind9.h
new file mode 100644
index 00000000..00bcb24c
--- /dev/null
+++ b/lib/isc/include/isc/bind9.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2009 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
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: bind9.h,v 1.2 2009/12/05 23:31:41 each Exp $ */
+
+#ifndef ISC_BIND9_H
+#define ISC_BIND9_H 1
+
+/*
+ * This determines whether we are building BIND9 or using the exported
+ * libisc/libdns libraries. The version of this file included in the
+ * standard BIND9 build defines BIND9; the version included with the
+ * exportable libraries does not.
+ */
+#define BIND9 1
+
+#endif /* ISC_BIND9_H */
diff --git a/lib/isc/include/isc/types.h b/lib/isc/include/isc/types.h
index 906bad17..01902315 100644
--- a/lib/isc/include/isc/types.h
+++ b/lib/isc/include/isc/types.h
@@ -15,11 +15,12 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: types.h,v 1.51 2009/10/01 01:30:01 sar Exp $ */
+/* $Id: types.h,v 1.52 2009/12/05 23:31:41 each Exp $ */
#ifndef ISC_TYPES_H
#define ISC_TYPES_H 1
+#include <isc/bind9.h>
#include <isc/namespace.h>
/*! \file isc/types.h
diff --git a/lib/isc/nls/Makefile.in b/lib/isc/nls/Makefile.in
index 8302a927..aca4a273 100644
--- a/lib/isc/nls/Makefile.in
+++ b/lib/isc/nls/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.16 2009/09/02 23:48:03 tbox Exp $
+# $Id: Makefile.in,v 1.17 2009/12/05 23:31:41 each Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -24,7 +24,7 @@ CINCLUDES = -I../unix/include \
-I../include \
-I${srcdir}/../include
-CDEFINES = -DBIND9
+CDEFINES =
CWARNINGS =
OBJS = msgcat.@O@
diff --git a/lib/isc/nothreads/Makefile.in b/lib/isc/nothreads/Makefile.in
index eef17652..ad2b2535 100644
--- a/lib/isc/nothreads/Makefile.in
+++ b/lib/isc/nothreads/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.9 2009/09/02 23:48:03 tbox Exp $
+# $Id: Makefile.in,v 1.10 2009/12/05 23:31:41 each Exp $
top_srcdir = @top_srcdir@
srcdir = @top_srcdir@/lib/isc/nothreads
@@ -25,7 +25,7 @@ CINCLUDES = -I${srcdir}/include \
-I${srcdir}/../include \
-I${srcdir}/..
-CDEFINES = -DBIND9
+CDEFINES =
CWARNINGS =
OBJS = condition.@O@ mutex.@O@ thread.@O@
diff --git a/lib/isc/pthreads/Makefile.in b/lib/isc/pthreads/Makefile.in
index 2cbda99f..d6e7c760 100644
--- a/lib/isc/pthreads/Makefile.in
+++ b/lib/isc/pthreads/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.21 2009/09/02 23:48:03 tbox Exp $
+# $Id: Makefile.in,v 1.22 2009/12/05 23:31:41 each Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -25,7 +25,7 @@ CINCLUDES = -I${srcdir}/include \
-I${srcdir}/../include \
-I${srcdir}/..
-CDEFINES = -DBIND9
+CDEFINES =
CWARNINGS =
OBJS = condition.@O@ mutex.@O@ thread.@O@
diff --git a/lib/isc/unix/Makefile.in b/lib/isc/unix/Makefile.in
index d47e5726..9884ca90 100644
--- a/lib/isc/unix/Makefile.in
+++ b/lib/isc/unix/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.43 2009/09/02 23:48:03 tbox Exp $
+# $Id: Makefile.in,v 1.44 2009/12/05 23:31:41 each Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -25,7 +25,7 @@ CINCLUDES = -I${srcdir}/include \
-I${srcdir}/../include \
-I${srcdir}/..
-CDEFINES = -DBIND9
+CDEFINES =
CWARNINGS =
# Alphabetically
diff --git a/lib/isc/win32/Makefile.in b/lib/isc/win32/Makefile.in
index acfbf32b..3396db1e 100644
--- a/lib/isc/win32/Makefile.in
+++ b/lib/isc/win32/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.13 2009/09/02 23:48:03 tbox Exp $
+# $Id: Makefile.in,v 1.14 2009/12/05 23:31:41 each Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -23,7 +23,7 @@ CINCLUDES = -I${srcdir}/.. \
-I./include \
-I${srcdir}/include \
-I${srcdir}/../include
-CDEFINES = -DBIND9
+CDEFINES =
CWARNINGS =
# Alphabetically
diff --git a/lib/isccc/Makefile.in b/lib/isccc/Makefile.in
index 31713e1a..297d9e37 100644
--- a/lib/isccc/Makefile.in
+++ b/lib/isccc/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.11 2009/09/02 23:48:03 tbox Exp $
+# $Id: Makefile.in,v 1.12 2009/12/05 23:31:41 each Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -27,7 +27,7 @@ top_srcdir = @top_srcdir@
CINCLUDES = -I. ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCC_INCLUDES}
-CDEFINES = -DBIND9
+CDEFINES =
CWARNINGS =
ISCLIBS = ../../lib/isc/libisc.@A@
diff --git a/lib/isccfg/Makefile.in b/lib/isccfg/Makefile.in
index d7dbb65a..2f154765 100644
--- a/lib/isccfg/Makefile.in
+++ b/lib/isccfg/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.20 2009/09/02 23:48:03 tbox Exp $
+# $Id: Makefile.in,v 1.21 2009/12/05 23:31:41 each Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -27,7 +27,7 @@ top_srcdir = @top_srcdir@
CINCLUDES = -I. ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES}
-CDEFINES = -DBIND9 @USE_DLZ@
+CDEFINES = @USE_DLZ@
CWARNINGS =
ISCLIBS = ../../lib/isc/libisc.@A@
diff --git a/lib/isccfg/api b/lib/isccfg/api
index 25708f02..e01b777a 100644
--- a/lib/isccfg/api
+++ b/lib/isccfg/api
@@ -1,3 +1,3 @@
LIBINTERFACE = 60
-LIBREVISION = 1
+LIBREVISION = 2
LIBAGE = 0
diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c
index c38de432..47b906f7 100644
--- a/lib/isccfg/namedconf.c
+++ b/lib/isccfg/namedconf.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: namedconf.c,v 1.110 2009/10/26 23:14:54 each Exp $ */
+/* $Id: namedconf.c,v 1.113 2009/12/04 21:09:34 marka Exp $ */
/*! \file */
@@ -523,6 +523,7 @@ static cfg_tuplefielddef_t checknames_fields[] = {
{ "mode", &cfg_type_checkmode, 0 },
{ NULL, NULL, 0 }
};
+
static cfg_type_t cfg_type_checknames = {
"checknames", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple, &cfg_rep_tuple,
checknames_fields
@@ -877,9 +878,6 @@ options_clauses[] = {
{ "use-ixfr", &cfg_type_boolean, 0 },
{ "version", &cfg_type_qstringornone, 0 },
{ "flush-zones-on-shutdown", &cfg_type_boolean, 0 },
-#ifdef ALLOW_FILTER_AAAA_ON_V4
- { "filter-aaaa-on-v4", &cfg_type_v4_aaaa, 0 },
-#endif
{ NULL, NULL, 0 }
};
@@ -1049,6 +1047,9 @@ view_clauses[] = {
{ "transfer-format", &cfg_type_transferformat, 0 },
{ "use-queryport-pool", &cfg_type_boolean, CFG_CLAUSEFLAG_OBSOLETE },
{ "zero-no-soa-ttl-cache", &cfg_type_boolean, 0 },
+#ifdef ALLOW_FILTER_AAAA_ON_V4
+ { "filter-aaaa-on-v4", &cfg_type_v4_aaaa, 0 },
+#endif
{ NULL, NULL, 0 }
};
@@ -1119,6 +1120,7 @@ zone_clauses[] = {
{ "also-notify", &cfg_type_portiplist, 0 },
{ "alt-transfer-source", &cfg_type_sockaddr4wild, 0 },
{ "alt-transfer-source-v6", &cfg_type_sockaddr6wild, 0 },
+ { "check-dup-records", &cfg_type_checkmode, 0 },
{ "check-integrity", &cfg_type_boolean, 0 },
{ "check-mx", &cfg_type_checkmode, 0 },
{ "check-mx-cname", &cfg_type_checkmode, 0 },
@@ -1126,7 +1128,8 @@ zone_clauses[] = {
{ "check-srv-cname", &cfg_type_checkmode, 0 },
{ "check-wildcard", &cfg_type_boolean, 0 },
{ "dialup", &cfg_type_dialuptype, 0 },
- { "dnskey-ksk-only", &cfg_type_boolean, 0 },
+ { "dnssec-dnskey-kskonly", &cfg_type_boolean, 0 },
+ { "dnssec-secure-to-insecure", &cfg_type_boolean, 0 },
{ "forward", &cfg_type_forwardtype, 0 },
{ "forwarders", &cfg_type_portiplist, 0 },
{ "key-directory", &cfg_type_qstring, 0 },
@@ -1149,7 +1152,6 @@ zone_clauses[] = {
{ "notify-source-v6", &cfg_type_sockaddr6wild, 0 },
{ "notify-to-soa", &cfg_type_boolean, 0 },
{ "nsec3-test-zone", &cfg_type_boolean, CFG_CLAUSEFLAG_TESTONLY },
- { "secure-to-insecure", &cfg_type_boolean, 0 },
{ "sig-signing-nodes", &cfg_type_uint32, 0 },
{ "sig-signing-signatures", &cfg_type_uint32, 0 },
{ "sig-signing-type", &cfg_type_uint32, 0 },
diff --git a/lib/tests/Makefile.in b/lib/tests/Makefile.in
index b336c9f3..105d567d 100644
--- a/lib/tests/Makefile.in
+++ b/lib/tests/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.27 2009/09/02 23:48:03 tbox Exp $
+# $Id: Makefile.in,v 1.28 2009/12/05 23:31:41 each Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -22,7 +22,7 @@ top_srcdir = @top_srcdir@
@BIND9_MAKE_INCLUDES@
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} ${TEST_INCLUDES}
-CDEFINES = -DBIND9
+CDEFINES =
CWARNINGS =
ISCLIBS = ../../lib/isc/libisc.@A@