- 9.6.1b1 release

- patches merged
- bind-96-isc_header.patch
- bind-95-rh469440.patch
- bind-96-realloc.patch
- bind9-fedora-0001.diff
- use -version-number instead of -version-info libtool param
This commit is contained in:
Adam Tkac 2009-03-30 14:54:41 +00:00
parent f949b56cdb
commit 35358171ac
9 changed files with 121 additions and 659 deletions

View File

@ -1,3 +1,3 @@
config-4.tar.bz2 config-4.tar.bz2
bind-chroot.tar.bz2 bind-chroot.tar.bz2
bind-9.6.0-P1.tar.gz bind-9.6.1b1.tar.gz

View File

@ -1,27 +1,6 @@
diff -up bind-9.5.0b2/bin/dig/Makefile.in.libidn bind-9.5.0b2/bin/dig/Makefile.in diff -up bind-9.6.1b1/bin/dig/dighost.c.libidn bind-9.6.1b1/bin/dig/dighost.c
--- bind-9.5.0b2/bin/dig/Makefile.in.libidn 2007-06-20 01:46:59.000000000 +0200 --- bind-9.6.1b1/bin/dig/dighost.c.libidn 2009-02-25 03:39:21.000000000 +0100
+++ bind-9.5.0b2/bin/dig/Makefile.in 2008-02-11 17:50:08.000000000 +0100 +++ bind-9.6.1b1/bin/dig/dighost.c 2009-03-30 15:01:41.350136527 +0200
@@ -45,7 +45,7 @@ DEPLIBS = ${DNSDEPLIBS} ${BIND9DEPLIBS}
${LWRESDEPLIBS}
LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} ${ISCLIBS} \
- ${ISCCFGLIBS} @IDNLIBS@ @LIBS@
+ ${ISCCFGLIBS} @IDNLIBS@ @LIBS@ -lidn
SUBDIRS =
@@ -63,6 +63,8 @@ HTMLPAGES = dig.html host.html nslookup.
MANOBJS = ${MANPAGES} ${HTMLPAGES}
+EXT_CFLAGS = -DWITH_LIBIDN
+
@BIND9_MAKE_RULES@
dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
diff -up bind-9.5.0b2/bin/dig/dighost.c.libidn bind-9.5.0b2/bin/dig/dighost.c
--- bind-9.5.0b2/bin/dig/dighost.c.libidn 2008-01-18 00:46:35.000000000 +0100
+++ bind-9.5.0b2/bin/dig/dighost.c 2008-02-11 17:49:03.000000000 +0100
@@ -44,6 +44,11 @@ @@ -44,6 +44,11 @@
#include <idn/api.h> #include <idn/api.h>
#endif #endif
@ -49,17 +28,17 @@ diff -up bind-9.5.0b2/bin/dig/dighost.c.libidn bind-9.5.0b2/bin/dig/dighost.c
/*% /*%
* Exit Codes: * Exit Codes:
* *
@@ -1004,6 +1017,9 @@ void @@ -1012,6 +1025,9 @@ setup_system(void) {
setup_system(void) {
dig_searchlist_t *domain = NULL; dig_searchlist_t *domain = NULL;
lwres_result_t lwresult; lwres_result_t lwresult;
unsigned int lwresflags;
+#ifdef WITH_LIBIDN +#ifdef WITH_LIBIDN
+ isc_result_t result; + isc_result_t result;
+#endif +#endif
debug("setup_system()"); debug("setup_system()");
@@ -1052,8 +1068,15 @@ setup_system(void) { @@ -1068,8 +1084,15 @@ setup_system(void) {
#ifdef WITH_IDN #ifdef WITH_IDN
initialize_idn(); initialize_idn();
@ -76,7 +55,7 @@ diff -up bind-9.5.0b2/bin/dig/dighost.c.libidn bind-9.5.0b2/bin/dig/dighost.c
if (keyfile[0] != 0) if (keyfile[0] != 0)
setup_file_key(); setup_file_key();
else if (keysecret[0] != 0) else if (keysecret[0] != 0)
@@ -1743,12 +1766,18 @@ setup_lookup(dig_lookup_t *lookup) { @@ -1770,12 +1793,18 @@ setup_lookup(dig_lookup_t *lookup) {
idn_result_t mr; idn_result_t mr;
char utf8_textname[MXNAME], utf8_origin[MXNAME], idn_textname[MXNAME]; char utf8_textname[MXNAME], utf8_origin[MXNAME], idn_textname[MXNAME];
#endif #endif
@ -96,7 +75,7 @@ diff -up bind-9.5.0b2/bin/dig/dighost.c.libidn bind-9.5.0b2/bin/dig/dighost.c
REQUIRE(lookup != NULL); REQUIRE(lookup != NULL);
INSIST(!free_now); INSIST(!free_now);
@@ -1785,6 +1814,16 @@ setup_lookup(dig_lookup_t *lookup) { @@ -1812,6 +1841,16 @@ setup_lookup(dig_lookup_t *lookup) {
mr = idn_encodename(IDN_LOCALCONV | IDN_DELIMMAP, lookup->textname, mr = idn_encodename(IDN_LOCALCONV | IDN_DELIMMAP, lookup->textname,
utf8_textname, sizeof(utf8_textname)); utf8_textname, sizeof(utf8_textname));
idn_check_result(mr, "convert textname to UTF-8"); idn_check_result(mr, "convert textname to UTF-8");
@ -113,7 +92,7 @@ diff -up bind-9.5.0b2/bin/dig/dighost.c.libidn bind-9.5.0b2/bin/dig/dighost.c
#endif #endif
/* /*
@@ -1804,6 +1843,15 @@ setup_lookup(dig_lookup_t *lookup) { @@ -1831,6 +1870,15 @@ setup_lookup(dig_lookup_t *lookup) {
lookup->origin = ISC_LIST_HEAD(search_list); lookup->origin = ISC_LIST_HEAD(search_list);
lookup->need_search = ISC_FALSE; lookup->need_search = ISC_FALSE;
} }
@ -129,7 +108,7 @@ diff -up bind-9.5.0b2/bin/dig/dighost.c.libidn bind-9.5.0b2/bin/dig/dighost.c
#else #else
if ((count_dots(lookup->textname) >= ndots) || !usesearch) { if ((count_dots(lookup->textname) >= ndots) || !usesearch) {
lookup->origin = NULL; /* Force abs lookup */ lookup->origin = NULL; /* Force abs lookup */
@@ -1830,6 +1878,20 @@ setup_lookup(dig_lookup_t *lookup) { @@ -1857,6 +1905,20 @@ setup_lookup(dig_lookup_t *lookup) {
IDN_IDNCONV | IDN_LENCHECK, utf8_textname, IDN_IDNCONV | IDN_LENCHECK, utf8_textname,
idn_textname, sizeof(idn_textname)); idn_textname, sizeof(idn_textname));
idn_check_result(mr, "convert UTF-8 textname to IDN encoding"); idn_check_result(mr, "convert UTF-8 textname to IDN encoding");
@ -150,7 +129,7 @@ diff -up bind-9.5.0b2/bin/dig/dighost.c.libidn bind-9.5.0b2/bin/dig/dighost.c
#else #else
if (lookup->origin != NULL) { if (lookup->origin != NULL) {
debug("trying origin %s", lookup->origin->origin); debug("trying origin %s", lookup->origin->origin);
@@ -1886,6 +1948,14 @@ setup_lookup(dig_lookup_t *lookup) { @@ -1913,6 +1975,14 @@ setup_lookup(dig_lookup_t *lookup) {
dns_rootname, dns_rootname,
ISC_FALSE, ISC_FALSE,
&lookup->namebuf); &lookup->namebuf);
@ -165,7 +144,7 @@ diff -up bind-9.5.0b2/bin/dig/dighost.c.libidn bind-9.5.0b2/bin/dig/dighost.c
#else #else
len = strlen(lookup->textname); len = strlen(lookup->textname);
isc_buffer_init(&b, lookup->textname, len); isc_buffer_init(&b, lookup->textname, len);
@@ -3317,7 +3387,7 @@ destroy_libs(void) { @@ -3432,7 +3502,7 @@ destroy_libs(void) {
void * ptr; void * ptr;
dig_message_t *chase_msg; dig_message_t *chase_msg;
#endif #endif
@ -174,7 +153,7 @@ diff -up bind-9.5.0b2/bin/dig/dighost.c.libidn bind-9.5.0b2/bin/dig/dighost.c
isc_result_t result; isc_result_t result;
#endif #endif
@@ -3356,6 +3426,10 @@ destroy_libs(void) { @@ -3471,6 +3541,10 @@ destroy_libs(void) {
result = dns_name_settotextfilter(NULL); result = dns_name_settotextfilter(NULL);
check_result(result, "dns_name_settotextfilter"); check_result(result, "dns_name_settotextfilter");
#endif #endif
@ -185,7 +164,7 @@ diff -up bind-9.5.0b2/bin/dig/dighost.c.libidn bind-9.5.0b2/bin/dig/dighost.c
dns_name_destroy(); dns_name_destroy();
if (commctx != NULL) { if (commctx != NULL) {
@@ -3532,6 +3606,79 @@ idn_check_result(idn_result_t r, const c @@ -3647,6 +3721,79 @@ idn_check_result(idn_result_t r, const c
} }
} }
#endif /* WITH_IDN */ #endif /* WITH_IDN */
@ -265,3 +244,24 @@ diff -up bind-9.5.0b2/bin/dig/dighost.c.libidn bind-9.5.0b2/bin/dig/dighost.c
#ifdef DIG_SIGCHASE #ifdef DIG_SIGCHASE
void void
diff -up bind-9.6.1b1/bin/dig/Makefile.in.libidn bind-9.6.1b1/bin/dig/Makefile.in
--- bind-9.6.1b1/bin/dig/Makefile.in.libidn 2007-06-20 01:46:59.000000000 +0200
+++ bind-9.6.1b1/bin/dig/Makefile.in 2009-03-30 15:00:42.883135505 +0200
@@ -45,7 +45,7 @@ DEPLIBS = ${DNSDEPLIBS} ${BIND9DEPLIBS}
${LWRESDEPLIBS}
LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} ${ISCLIBS} \
- ${ISCCFGLIBS} @IDNLIBS@ @LIBS@
+ ${ISCCFGLIBS} @IDNLIBS@ @LIBS@ -lidn
SUBDIRS =
@@ -63,6 +63,8 @@ HTMLPAGES = dig.html host.html nslookup.
MANOBJS = ${MANPAGES} ${HTMLPAGES}
+EXT_CFLAGS = -DWITH_LIBIDN
+
@BIND9_MAKE_RULES@
dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}

View File

@ -1,42 +0,0 @@
diff -up bind-9.5.1b2/bin/dig/dighost.c.rh469440 bind-9.5.1b2/bin/dig/dighost.c
--- bind-9.5.1b2/bin/dig/dighost.c.rh469440 2008-11-03 10:14:05.000000000 +0100
+++ bind-9.5.1b2/bin/dig/dighost.c 2008-11-03 10:33:13.000000000 +0100
@@ -596,6 +596,11 @@ copy_server_list(lwres_conf_t *confdata,
for (i = 0; i < confdata->nsnext; i++) {
af = addr2af(confdata->nameservers[i].family);
+ if (af == AF_INET && !have_ipv4)
+ continue;
+ if (af == AF_INET6 && !have_ipv6)
+ continue;
+
lwres_net_ntop(af, confdata->nameservers[i].address,
tmp, sizeof(tmp));
newsrv = make_server(tmp, tmp);
@@ -1051,8 +1056,10 @@ setup_system(void) {
debug("ndots is %d.", ndots);
}
+ copy_server_list(lwconf, &server_list);
+
/* If we don't find a nameserver fall back to localhost */
- if (lwconf->nsnext == 0) {
+ if (ISC_LIST_EMPTY(server_list)) {
if (have_ipv4) {
lwresult = add_nameserver(lwconf, "127.0.0.1", AF_INET);
if (lwresult != ISC_R_SUCCESS)
@@ -1063,10 +1070,12 @@ setup_system(void) {
if (lwresult != ISC_R_SUCCESS)
fatal("add_nameserver failed");
}
- }
- if (ISC_LIST_EMPTY(server_list))
copy_server_list(lwconf, &server_list);
+ if (ISC_LIST_EMPTY(server_list)) {
+ fatal("Could not find any nameserver");
+ }
+ }
#ifdef WITH_IDN
initialize_idn();

View File

@ -1,7 +1,6 @@
diff --git a/bin/named/main.c b/bin/named/main.c diff -up bind-9.6.1b1/bin/named/main.c.dyndb bind-9.6.1b1/bin/named/main.c
index aa6575a..8030e3d 100644 --- bind-9.6.1b1/bin/named/main.c.dyndb 2009-01-19 00:47:34.000000000 +0100
--- a/bin/named/main.c +++ bind-9.6.1b1/bin/named/main.c 2009-03-30 14:56:54.895136109 +0200
+++ b/bin/named/main.c
@@ -44,6 +44,7 @@ @@ -44,6 +44,7 @@
#include <isccc/result.h> #include <isccc/result.h>
@ -19,11 +18,10 @@ index aa6575a..8030e3d 100644
dns_name_destroy(); dns_name_destroy();
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
diff --git a/bin/named/server.c b/bin/named/server.c diff -up bind-9.6.1b1/bin/named/server.c.dyndb bind-9.6.1b1/bin/named/server.c
index 31b2761..b76f3ce 100644 --- bind-9.6.1b1/bin/named/server.c.dyndb 2009-01-30 04:53:38.000000000 +0100
--- a/bin/named/server.c +++ bind-9.6.1b1/bin/named/server.c 2009-03-30 14:59:00.478136755 +0200
+++ b/bin/named/server.c @@ -57,6 +57,7 @@
@@ -56,6 +56,7 @@
#ifdef DLZ #ifdef DLZ
#include <dns/dlz.h> #include <dns/dlz.h>
#endif #endif
@ -31,7 +29,7 @@ index 31b2761..b76f3ce 100644
#include <dns/forward.h> #include <dns/forward.h>
#include <dns/journal.h> #include <dns/journal.h>
#include <dns/keytable.h> #include <dns/keytable.h>
@@ -849,6 +850,72 @@ configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) { @@ -849,6 +850,72 @@ configure_peer(const cfg_obj_t *cpeer, i
} }
static isc_result_t static isc_result_t
@ -104,7 +102,7 @@ index 31b2761..b76f3ce 100644
disable_algorithms(const cfg_obj_t *disabled, dns_resolver_t *resolver) { disable_algorithms(const cfg_obj_t *disabled, dns_resolver_t *resolver) {
isc_result_t result; isc_result_t result;
const cfg_obj_t *algorithms; const cfg_obj_t *algorithms;
@@ -999,6 +1066,7 @@ configure_view(dns_view_t *view, const cfg_obj_t *config, @@ -1016,6 +1083,7 @@ configure_view(dns_view_t *view, const c
unsigned int dlzargc; unsigned int dlzargc;
char **dlzargv; char **dlzargv;
#endif #endif
@ -112,8 +110,8 @@ index 31b2761..b76f3ce 100644
const cfg_obj_t *disabled; const cfg_obj_t *disabled;
const cfg_obj_t *obj; const cfg_obj_t *obj;
const cfg_listelt_t *element; const cfg_listelt_t *element;
@@ -1171,6 +1239,22 @@ configure_view(dns_view_t *view, const cfg_obj_t *config, @@ -1238,6 +1306,22 @@ configure_view(dns_view_t *view, const c
#endif view->maxncachettl = 7 * 24 * 3600;
/* /*
+ * Configure dynamic databases. + * Configure dynamic databases.
@ -135,34 +133,9 @@ index 31b2761..b76f3ce 100644
* Configure the view's cache. Try to reuse an existing * Configure the view's cache. Try to reuse an existing
* cache if possible, otherwise create a new cache. * cache if possible, otherwise create a new cache.
* Note that the ADB is not preserved in either case. * Note that the ADB is not preserved in either case.
diff --git a/lib/dns/Makefile.in b/lib/dns/Makefile.in diff -up /dev/null bind-9.6.1b1/lib/dns/dynamic_db.c
index ef5c12a..0f7abba 100644 --- /dev/null 2009-03-30 11:37:35.392000941 +0200
--- a/lib/dns/Makefile.in +++ bind-9.6.1b1/lib/dns/dynamic_db.c 2009-03-30 14:56:54.899136384 +0200
+++ b/lib/dns/Makefile.in
@@ -57,7 +57,8 @@ DSTOBJS = @DST_EXTRA_OBJS@ \
DNSOBJS = acache.@O@ acl.@O@ adb.@O@ byaddr.@O@ \
cache.@O@ callbacks.@O@ compress.@O@ \
db.@O@ dbiterator.@O@ dbtable.@O@ diff.@O@ dispatch.@O@ \
- dlz.@O@ dnssec.@O@ ds.@O@ forward.@O@ iptable.@O@ journal.@O@ \
+ dlz.@O@ dnssec.@O@ ds.@O@ dynamic_db.@O@ forward.@O@ \
+ iptable.@O@ journal.@O@ \
keytable.@O@ lib.@O@ log.@O@ lookup.@O@ \
master.@O@ masterdump.@O@ message.@O@ \
name.@O@ ncache.@O@ nsec.@O@ nsec3.@O@ order.@O@ peer.@O@ portlist.@O@ \
@@ -83,7 +84,7 @@ DSTSRCS = @DST_EXTRA_SRCS@ \
DNSSRCS = acache.c acl.c adb.c byaddr.c \
cache.c callbacks.c compress.c \
db.c dbiterator.c dbtable.c diff.c dispatch.c \
- dlz.c dnssec.c ds.c forward.c iptable.c journal.c \
+ dlz.c dnssec.c ds.c dynamic_db.c forward.c iptable.c journal.c \
keytable.c lib.c log.c lookup.c \
master.c masterdump.c message.c \
name.c ncache.c nsec.c nsec3.c order.c peer.c portlist.c \
diff --git a/lib/dns/dynamic_db.c b/lib/dns/dynamic_db.c
new file mode 100644
index 0000000..b95b1fe
--- /dev/null
+++ b/lib/dns/dynamic_db.c
@@ -0,0 +1,240 @@ @@ -0,0 +1,240 @@
+/* +/*
+ * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
@ -404,24 +377,9 @@ index 0000000..b95b1fe
+ +
+ isc_mutex_destroy(&dyndb_lock); + isc_mutex_destroy(&dyndb_lock);
+} +}
diff --git a/lib/dns/include/dns/Makefile.in b/lib/dns/include/dns/Makefile.in diff -up /dev/null bind-9.6.1b1/lib/dns/include/dns/dynamic_db.h
index e9e049e..27fdc45 100644 --- /dev/null 2009-03-30 11:37:35.392000941 +0200
--- a/lib/dns/include/dns/Makefile.in +++ bind-9.6.1b1/lib/dns/include/dns/dynamic_db.h 2009-03-30 14:56:54.899136384 +0200
+++ b/lib/dns/include/dns/Makefile.in
@@ -23,7 +23,7 @@ top_srcdir = @top_srcdir@
HEADERS = acl.h adb.h byaddr.h cache.h callbacks.h \
cert.h compress.h \
- db.h dbiterator.h dbtable.h diff.h dispatch.h dlz.h \
+ db.h dbiterator.h dbtable.h diff.h dispatch.h dlz.h dynamic_db.h \
dnssec.h ds.h events.h fixedname.h iptable.h journal.h keyflags.h \
keytable.h keyvalues.h lib.h log.h master.h masterdump.h \
message.h name.h ncache.h \
diff --git a/lib/dns/include/dns/dynamic_db.h b/lib/dns/include/dns/dynamic_db.h
new file mode 100644
index 0000000..03339e6
--- /dev/null
+++ b/lib/dns/include/dns/dynamic_db.h
@@ -0,0 +1,32 @@ @@ -0,0 +1,32 @@
+/* +/*
+ * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
@ -455,11 +413,10 @@ index 0000000..03339e6
+void dns_dynamic_db_cleanup(void); +void dns_dynamic_db_cleanup(void);
+ +
+#endif +#endif
diff --git a/lib/dns/include/dns/log.h b/lib/dns/include/dns/log.h diff -up bind-9.6.1b1/lib/dns/include/dns/log.h.dyndb bind-9.6.1b1/lib/dns/include/dns/log.h
index 5adcedd..e171028 100644 --- bind-9.6.1b1/lib/dns/include/dns/log.h.dyndb 2009-01-19 00:47:41.000000000 +0100
--- a/lib/dns/include/dns/log.h +++ bind-9.6.1b1/lib/dns/include/dns/log.h 2009-03-30 14:56:54.899136384 +0200
+++ b/lib/dns/include/dns/log.h @@ -73,6 +73,7 @@ LIBDNS_EXTERNAL_DATA extern isc_logmodul
@@ -73,6 +73,7 @@ LIBDNS_EXTERNAL_DATA extern isc_logmodule_t dns_modules[];
#define DNS_LOGMODULE_HINTS (&dns_modules[24]) #define DNS_LOGMODULE_HINTS (&dns_modules[24])
#define DNS_LOGMODULE_ACACHE (&dns_modules[25]) #define DNS_LOGMODULE_ACACHE (&dns_modules[25])
#define DNS_LOGMODULE_DLZ (&dns_modules[26]) #define DNS_LOGMODULE_DLZ (&dns_modules[26])
@ -467,11 +424,22 @@ index 5adcedd..e171028 100644
ISC_LANG_BEGINDECLS ISC_LANG_BEGINDECLS
diff --git a/lib/dns/log.c b/lib/dns/log.c diff -up bind-9.6.1b1/lib/dns/include/dns/Makefile.in.dyndb bind-9.6.1b1/lib/dns/include/dns/Makefile.in
index 7551e15..b9864eb 100644 --- bind-9.6.1b1/lib/dns/include/dns/Makefile.in.dyndb 2008-11-15 00:47:33.000000000 +0100
--- a/lib/dns/log.c +++ bind-9.6.1b1/lib/dns/include/dns/Makefile.in 2009-03-30 14:56:54.899136384 +0200
+++ b/lib/dns/log.c @@ -23,7 +23,7 @@ top_srcdir = @top_srcdir@
@@ -79,6 +79,7 @@ LIBDNS_EXTERNAL_DATA isc_logmodule_t dns_modules[] = {
HEADERS = acl.h adb.h byaddr.h cache.h callbacks.h \
cert.h compress.h \
- db.h dbiterator.h dbtable.h diff.h dispatch.h dlz.h \
+ db.h dbiterator.h dbtable.h diff.h dispatch.h dlz.h dynamic_db.h \
dnssec.h ds.h events.h fixedname.h iptable.h journal.h keyflags.h \
keytable.h keyvalues.h lib.h log.h master.h masterdump.h \
message.h name.h ncache.h \
diff -up bind-9.6.1b1/lib/dns/log.c.dyndb bind-9.6.1b1/lib/dns/log.c
--- bind-9.6.1b1/lib/dns/log.c.dyndb 2007-06-19 01:47:40.000000000 +0200
+++ bind-9.6.1b1/lib/dns/log.c 2009-03-30 14:56:54.899136384 +0200
@@ -79,6 +79,7 @@ LIBDNS_EXTERNAL_DATA isc_logmodule_t dns
{ "dns/hints", 0 }, { "dns/hints", 0 },
{ "dns/acache", 0 }, { "dns/acache", 0 },
{ "dns/dlz", 0 }, { "dns/dlz", 0 },
@ -479,10 +447,31 @@ index 7551e15..b9864eb 100644
{ NULL, 0 } { NULL, 0 }
}; };
diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c diff -up bind-9.6.1b1/lib/dns/Makefile.in.dyndb bind-9.6.1b1/lib/dns/Makefile.in
index 0610489..a1dba32 100644 --- bind-9.6.1b1/lib/dns/Makefile.in.dyndb 2009-03-30 14:56:54.887146135 +0200
--- a/lib/isccfg/namedconf.c +++ bind-9.6.1b1/lib/dns/Makefile.in 2009-03-30 14:56:54.899136384 +0200
+++ b/lib/isccfg/namedconf.c @@ -57,7 +57,8 @@ DSTOBJS = @DST_EXTRA_OBJS@ \
DNSOBJS = acache.@O@ acl.@O@ adb.@O@ byaddr.@O@ \
cache.@O@ callbacks.@O@ compress.@O@ \
db.@O@ dbiterator.@O@ dbtable.@O@ diff.@O@ dispatch.@O@ \
- dlz.@O@ dnssec.@O@ ds.@O@ forward.@O@ iptable.@O@ journal.@O@ \
+ dlz.@O@ dnssec.@O@ ds.@O@ dynamic_db.@O@ forward.@O@ \
+ iptable.@O@ journal.@O@ \
keytable.@O@ lib.@O@ log.@O@ lookup.@O@ \
master.@O@ masterdump.@O@ message.@O@ \
name.@O@ ncache.@O@ nsec.@O@ nsec3.@O@ order.@O@ peer.@O@ portlist.@O@ \
@@ -83,7 +84,7 @@ DSTSRCS = @DST_EXTRA_SRCS@ \
DNSSRCS = acache.c acl.c adb.c byaddr.c \
cache.c callbacks.c compress.c \
db.c dbiterator.c dbtable.c diff.c dispatch.c \
- dlz.c dnssec.c ds.c forward.c iptable.c journal.c \
+ dlz.c dnssec.c ds.c dynamic_db.c forward.c iptable.c journal.c \
keytable.c lib.c log.c lookup.c \
master.c masterdump.c message.c \
name.c ncache.c nsec.c nsec3.c order.c peer.c portlist.c \
diff -up bind-9.6.1b1/lib/isccfg/namedconf.c.dyndb bind-9.6.1b1/lib/isccfg/namedconf.c
--- bind-9.6.1b1/lib/isccfg/namedconf.c.dyndb 2008-09-28 01:35:31.000000000 +0200
+++ bind-9.6.1b1/lib/isccfg/namedconf.c 2009-03-30 14:56:54.903136167 +0200
@@ -78,6 +78,7 @@ static cfg_type_t cfg_type_controls; @@ -78,6 +78,7 @@ static cfg_type_t cfg_type_controls;
static cfg_type_t cfg_type_controls_sockaddr; static cfg_type_t cfg_type_controls_sockaddr;
static cfg_type_t cfg_type_destinationlist; static cfg_type_t cfg_type_destinationlist;
@ -499,7 +488,7 @@ index 0610489..a1dba32 100644
{ "server", &cfg_type_server, CFG_CLAUSEFLAG_MULTI }, { "server", &cfg_type_server, CFG_CLAUSEFLAG_MULTI },
{ "trusted-keys", &cfg_type_trustedkeys, CFG_CLAUSEFLAG_MULTI }, { "trusted-keys", &cfg_type_trustedkeys, CFG_CLAUSEFLAG_MULTI },
{ NULL, NULL, 0 } { NULL, NULL, 0 }
@@ -1365,6 +1367,40 @@ static cfg_type_t cfg_type_dialuptype = { @@ -1365,6 +1367,40 @@ static cfg_type_t cfg_type_dialuptype =
&cfg_rep_string, dialup_enums &cfg_rep_string, dialup_enums
}; };

View File

@ -1,12 +0,0 @@
diff -up bind-9.6.0rc1/lib/isc/include/isc/Makefile.in.isc_header bind-9.6.0rc1/lib/isc/include/isc/Makefile.in
--- bind-9.6.0rc1/lib/isc/include/isc/Makefile.in.isc_header 2009-01-14 09:23:35.000000000 +0100
+++ bind-9.6.0rc1/lib/isc/include/isc/Makefile.in 2009-02-02 08:47:56.000000000 +0100
@@ -31,7 +31,7 @@ HEADERS = app.h assertions.h base64.h bi
eventclass.h file.h formatcheck.h fsaccess.h \
hash.h heap.h hex.h hmacmd5.h \
httpd.h \
- interfaceiter.h @ISC_IPV6_H@ lang.h lex.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 \

View File

@ -1,261 +0,0 @@
Index: lib/isc/mem.c
===================================================================
RCS file: /var/snap/bind9/lib/isc/mem.c,v
retrieving revision 1.145
retrieving revision 1.145.120.4
diff -u -p -r1.145 -r1.145.120.4
--- lib/isc/mem.c 2 Apr 2008 02:37:42 -0000 1.145
+++ lib/isc/mem.c 16 Feb 2009 03:17:05 -0000 1.145.120.4
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1997-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: bind-96-realloc.patch,v 1.1 2009/03/04 09:27:48 atkac Exp $ */
+/* $Id: bind-96-realloc.patch,v 1.1 2009/03/04 09:27:48 atkac Exp $ */
/*! \file */
@@ -52,7 +52,7 @@ LIBISC_EXTERNAL_DATA unsigned int isc_me
#define DEF_MAX_SIZE 1100
#define DEF_MEM_TARGET 4096
-#define ALIGNMENT_SIZE 8 /*%< must be a power of 2 */
+#define ALIGNMENT_SIZE 8U /*%< must be a power of 2 */
#define NUM_BASIC_BLOCKS 64 /*%< must be > 1 */
#define TABLE_INCREMENT 1024
#define DEBUGLIST_COUNT 1024
@@ -1191,7 +1191,7 @@ print_active(isc_mem_t *mctx, FILE *out)
const char *format;
isc_boolean_t found;
- fprintf(out, isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
+ fprintf(out, "%s", isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
ISC_MSG_DUMPALLOC,
"Dump of all outstanding "
"memory allocations:\n"));
@@ -1217,7 +1217,7 @@ print_active(isc_mem_t *mctx, FILE *out)
}
}
if (!found)
- fprintf(out, isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
+ fprintf(out, "%s", isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
ISC_MSG_NONE, "\tNone.\n"));
}
}
@@ -1259,7 +1259,7 @@ isc_mem_stats(isc_mem_t *ctx, FILE *out)
*/
pool = ISC_LIST_HEAD(ctx->pools);
if (pool != NULL) {
- fprintf(out, isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
+ fprintf(out, "%s", isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
ISC_MSG_POOLSTATS,
"[Pool statistics]\n"));
fprintf(out, "%15s %10s %10s %10s %10s %10s %10s %10s %1s\n",
@@ -1365,6 +1365,40 @@ isc__mem_allocate(isc_mem_t *ctx, size_t
return (si);
}
+void *
+isc__mem_reallocate(isc_mem_t *ctx, void *ptr, size_t size FLARG) {
+ void *new_ptr = NULL;
+ size_t oldsize, copysize;
+
+ REQUIRE(VALID_CONTEXT(ctx));
+
+ /*
+ * This function emulates the realloc(3) standard library function:
+ * - if size > 0, allocate new memory; and if ptr is non NULL, copy
+ * as much of the old contents to the new buffer and free the old one.
+ * Note that when allocation fails the original pointer is intact;
+ * the caller must free it.
+ * - if size is 0 and ptr is non NULL, simply free the given ptr.
+ * - this function returns:
+ * pointer to the newly allocated memory, or
+ * NULL if allocation fails or doesn't happen.
+ */
+ if (size > 0U) {
+ new_ptr = isc__mem_allocate(ctx, size FLARG_PASS);
+ if (new_ptr != NULL && ptr != NULL) {
+ oldsize = (((size_info *)ptr)[-1]).u.size;
+ INSIST(oldsize >= ALIGNMENT_SIZE);
+ oldsize -= ALIGNMENT_SIZE;
+ copysize = oldsize > size ? size : oldsize;
+ memcpy(new_ptr, ptr, copysize);
+ isc__mem_free(ctx, ptr FLARG_PASS);
+ }
+ } else if (ptr != NULL)
+ isc__mem_free(ctx, ptr FLARG_PASS);
+
+ return (new_ptr);
+}
+
void
isc__mem_free(isc_mem_t *ctx, void *ptr FLARG) {
size_info *si;
Index: lib/isc/include/isc/mem.h
===================================================================
RCS file: /var/snap/bind9/lib/isc/include/isc/mem.h,v
retrieving revision 1.78
retrieving revision 1.78.120.3
diff -u -p -r1.78 -r1.78.120.3
--- lib/isc/include/isc/mem.h 31 Mar 2008 05:00:30 -0000 1.78
+++ lib/isc/include/isc/mem.h 11 Feb 2009 03:07:01 -0000 1.78.120.3
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1997-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: bind-96-realloc.patch,v 1.1 2009/03/04 09:27:48 atkac Exp $ */
+/* $Id: bind-96-realloc.patch,v 1.1 2009/03/04 09:27:48 atkac Exp $ */
#ifndef ISC_MEM_H
#define ISC_MEM_H 1
@@ -94,7 +94,7 @@ LIBISC_EXTERNAL_DATA extern unsigned int
/*!<
* The variable isc_mem_debugging holds a set of flags for
* turning certain memory debugging options on or off at
- * runtime. Its is intialized to the value ISC_MEM_DEGBUGGING,
+ * runtime. It is initialized to the value ISC_MEM_DEGBUGGING,
* which is 0 by default but may be overridden at compile time.
* The following flags can be specified:
*
@@ -106,7 +106,7 @@ LIBISC_EXTERNAL_DATA extern unsigned int
* Crash if a free doesn't match an allocation.
*
* \li #ISC_MEM_DEBUGUSAGE
- * If a hi_water mark is set, print the maximium inuse memory
+ * If a hi_water mark is set, print the maximum inuse memory
* every time it is raised once it exceeds the hi_water mark.
*
* \li #ISC_MEM_DEBUGSIZE
@@ -154,11 +154,12 @@ LIBISC_EXTERNAL_DATA extern unsigned int
#define isc_mem_get(c, s) isc__mem_get((c), (s) _ISC_MEM_FILELINE)
#define isc_mem_allocate(c, s) isc__mem_allocate((c), (s) _ISC_MEM_FILELINE)
+#define isc_mem_reallocate(c, p, s) isc__mem_reallocate((c), (p), (s) _ISC_MEM_FILELINE)
#define isc_mem_strdup(c, p) isc__mem_strdup((c), (p) _ISC_MEM_FILELINE)
#define isc_mempool_get(c) isc__mempool_get((c) _ISC_MEM_FILELINE)
/*%
- * isc_mem_putanddetach() is a convienence function for use where you
+ * isc_mem_putanddetach() is a convenience function for use where you
* have a structure with an attached memory context.
*
* Given:
@@ -341,12 +342,12 @@ isc_mem_setwater(isc_mem_t *mctx, isc_me
*
* When the memory usage of 'mctx' exceeds 'hiwater',
* '(water)(water_arg, #ISC_MEM_HIWATER)' will be called. 'water' needs to
- * call isc_mem_waterack() with #ISC_MEM_HIWATER to acknowlege the state
+ * call isc_mem_waterack() with #ISC_MEM_HIWATER to acknowledge the state
* change. 'water' may be called multiple times.
*
* When the usage drops below 'lowater', 'water' will again be called, this
* time with #ISC_MEM_LOWATER. 'water' need to calls isc_mem_waterack() with
- * #ISC_MEM_LOWATER to acknowlege the change.
+ * #ISC_MEM_LOWATER to acknowledge the change.
*
* static void
* water(void *arg, int mark) {
@@ -373,7 +374,7 @@ isc_mem_setwater(isc_mem_t *mctx, isc_me
void
isc_mem_waterack(isc_mem_t *ctx, int mark);
/*%<
- * Called to acknowledge changes in signalled by calls to 'water'.
+ * Called to acknowledge changes in signaled by calls to 'water'.
*/
void
@@ -512,7 +513,7 @@ isc_mempool_associatelock(isc_mempool_t
* and it is also used to set or get internal state via the isc_mempool_get*()
* and isc_mempool_set*() set of functions.
*
- * Mutiple pools can each share a single lock. For instance, if "manager"
+ * Multiple pools can each share a single lock. For instance, if "manager"
* type object contained pools for various sizes of events, and each of
* these pools used a common lock. Note that this lock must NEVER be used
* by other than mempool routines once it is given to a pool, since that can
@@ -612,6 +613,8 @@ void
isc__mem_put(isc_mem_t *, void *, size_t _ISC_MEM_FLARG);
void *
isc__mem_allocate(isc_mem_t *, size_t _ISC_MEM_FLARG);
+void *
+isc__mem_reallocate(isc_mem_t *, void *, size_t _ISC_MEM_FLARG);
void
isc__mem_free(isc_mem_t *, void * _ISC_MEM_FLARG);
char *
Index: lib/dns/openssl_link.c
===================================================================
RCS file: /var/snap/bind9/lib/dns/openssl_link.c,v
retrieving revision 1.22
retrieving revision 1.22.112.3
diff -u -p -r1.22 -r1.22.112.3
--- lib/dns/openssl_link.c 5 Apr 2008 23:47:11 -0000 1.22
+++ lib/dns/openssl_link.c 11 Feb 2009 03:07:01 -0000 1.22.112.3
@@ -1,5 +1,5 @@
/*
- * Portions Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -31,7 +31,7 @@
/*
* Principal Author: Brian Wellington
- * $Id: bind-96-realloc.patch,v 1.1 2009/03/04 09:27:48 atkac Exp $
+ * $Id: bind-96-realloc.patch,v 1.1 2009/03/04 09:27:48 atkac Exp $
*/
#ifdef OPENSSL
@@ -148,18 +148,8 @@ mem_free(void *ptr) {
static void *
mem_realloc(void *ptr, size_t size) {
- void *p;
-
INSIST(dst__memory_pool != NULL);
- p = NULL;
- if (size > 0U) {
- p = mem_alloc(size);
- if (p != NULL && ptr != NULL)
- memcpy(p, ptr, size);
- }
- if (ptr != NULL)
- mem_free(ptr);
- return (p);
+ return (isc_mem_reallocate(dst__memory_pool, ptr, size));
}
isc_result_t
@@ -252,7 +242,7 @@ dst__openssl_init() {
for (e = ENGINE_get_first(); e != NULL; e = ENGINE_get_next(e)) {
/*
- * Something wierd here. If we call ENGINE_finish()
+ * Something weird here. If we call ENGINE_finish()
* ENGINE_get_default_RAND() will fail.
*/
if (ENGINE_init(e)) {
@@ -386,7 +376,7 @@ dst__openssl_setdefault(const char *name
*
* 'engine_id' is the openssl engine name.
*
- * pre_cmds and post_cmds a sequence if command arguement pairs
+ * pre_cmds and post_cmds a sequence if command argument pairs
* pre_num and post_num are a count of those pairs.
*
* "SO_PATH", PKCS11_SO_PATH ("/usr/local/lib/engines/engine_pkcs11.so")

View File

@ -2,11 +2,11 @@
# Red Hat BIND package .spec file # Red Hat BIND package .spec file
# #
%define PATCHVER P1 #%define PATCHVER P1
#%define PREVER rc2 %define PREVER b1
#%define VERSION %{version}%{PREVER}
#%define VERSION %{version} #%define VERSION %{version}
%define VERSION %{version}-%{PATCHVER} #%define VERSION %{version}-%{PATCHVER}
%define VERSION %{version}%{PREVER}
%{?!SDB: %define SDB 1} %{?!SDB: %define SDB 1}
%{?!test: %define test 0} %{?!test: %define test 0}
@ -19,8 +19,8 @@
Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server
Name: bind Name: bind
License: ISC License: ISC
Version: 9.6.0 Version: 9.6.1
Release: 11.1.%{PATCHVER}%{?dist} Release: 0.1.%{PREVER}%{?dist}
Epoch: 32 Epoch: 32
Url: http://www.isc.org/products/BIND/ Url: http://www.isc.org/products/BIND/
Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -49,12 +49,9 @@ Patch16: bind-9.3.2-redhat_doc.patch
Patch71: bind-9.5-overflow.patch Patch71: bind-9.5-overflow.patch
Patch72: bind-9.5-dlz-64bit.patch Patch72: bind-9.5-dlz-64bit.patch
Patch87: bind-9.5-parallel-build.patch Patch87: bind-9.5-parallel-build.patch
Patch96: bind-95-rh469440.patch
Patch99: bind-96-libtool2.patch Patch99: bind-96-libtool2.patch
Patch101:bind-96-old-api.patch Patch101:bind-96-old-api.patch
Patch102:bind-95-rh452060.patch Patch102:bind-95-rh452060.patch
Patch103:bind-96-realloc.patch
Patch106:bind9-fedora-0001.diff
# SDB patches # SDB patches
Patch11: bind-9.3.2b2-sdbsrc.patch Patch11: bind-9.3.2b2-sdbsrc.patch
@ -64,7 +61,6 @@ Patch62: bind-9.5-sdb-sqlite-bld.patch
# needs inpection # needs inpection
Patch17: bind-9.3.2b1-fix_sdb_ldap.patch Patch17: bind-9.3.2b1-fix_sdb_ldap.patch
Patch104: bind-96-dyndb.patch Patch104: bind-96-dyndb.patch
Patch105: bind-96-isc_header.patch
# IDN paches # IDN paches
Patch73: bind-9.5-libidn.patch Patch73: bind-9.5-libidn.patch
@ -172,7 +168,6 @@ Based on the code from Jan "Yenya" Kasprzak <kas@fi.muni.cz>
%patch10 -p1 -b .PIE %patch10 -p1 -b .PIE
%patch16 -p1 -b .redhat_doc %patch16 -p1 -b .redhat_doc
%patch104 -p1 -b .dyndb %patch104 -p1 -b .dyndb
%patch105 -p1 -b .isc_header
%if %{SDB} %if %{SDB}
%patch101 -p1 -b .old-api %patch101 -p1 -b .old-api
mkdir bin/named-sdb mkdir bin/named-sdb
@ -213,15 +208,12 @@ cp -fp contrib/sdb/sqlite/zone2sqlite.c bin/sdb_tools
%patch85 -p1 -b .libidn3 %patch85 -p1 -b .libidn3
%patch87 -p1 -b .parallel %patch87 -p1 -b .parallel
%patch94 -p1 -b .rh461409 %patch94 -p1 -b .rh461409
%patch96 -p1 -b .rh469440
# XXX due new libtool. Not sure about proper upstream approach yet. # XXX due new libtool. Not sure about proper upstream approach yet.
mkdir m4 mkdir m4
%patch99 -p1 -b .libtool2 %patch99 -p1 -b .libtool2
%patch102 -p1 -b .rh452060 %patch102 -p1 -b .rh452060
%patch103 -p0 -b .realloc
%patch106 -p1 -b .nsec3
# Sparc and s390 arches need to use -fPIE # Sparc and s390 arches need to use -fPIE
%ifarch sparcv9 sparc64 s390 s390x %ifarch sparcv9 sparc64 s390 s390x
@ -241,6 +233,11 @@ sed -i -e \
's/RELEASEVER=\(.*\)/RELEASEVER=\1-RedHat-%{version}-%{release}/' \ 's/RELEASEVER=\(.*\)/RELEASEVER=\1-RedHat-%{version}-%{release}/' \
version version
# Substitute libtool -version-info parameter by -version-number
for all in `find . |grep Makefile.in`; do
sed -i 's/-version-info/-version-number/' $all
done
libtoolize -c -f; aclocal -I m4 --force; autoheader -f; autoconf -f libtoolize -c -f; aclocal -I m4 --force; autoheader -f; autoconf -f
%configure \ %configure \
@ -545,6 +542,7 @@ rm -rf ${RPM_BUILD_ROOT}
%{_includedir}/isccc %{_includedir}/isccc
%{_includedir}/isccfg %{_includedir}/isccfg
%{_includedir}/lwres %{_includedir}/lwres
%{_mandir}/man1/isc-config.sh.1*
%{_mandir}/man3/lwres* %{_mandir}/man3/lwres*
%{_bindir}/isc-config.sh %{_bindir}/isc-config.sh
@ -571,6 +569,15 @@ rm -rf ${RPM_BUILD_ROOT}
%ghost %{chroot_prefix}/etc/localtime %ghost %{chroot_prefix}/etc/localtime
%changelog %changelog
* Mon Mar 30 2009 Adam Tkac <atkac redhat com> 32:9.6.1-0.1.b1
- 9.6.1b1 release
- patches merged
- bind-96-isc_header.patch
- bind-95-rh469440.patch
- bind-96-realloc.patch
- bind9-fedora-0001.diff
- use -version-number instead of -version-info libtool param
* Mon Mar 23 2009 Adam Tkac <atkac redhat com> 32:9.6.0-11.1.P1 * Mon Mar 23 2009 Adam Tkac <atkac redhat com> 32:9.6.0-11.1.P1
- logrotate configuration file now points to /var/named/data/named.run by - logrotate configuration file now points to /var/named/data/named.run by
default (#489986) default (#489986)

View File

@ -1,219 +0,0 @@
diff -ur bind-9.6.0-P1.pristine/lib/dns/resolver.c bind-9.6.0-P1/lib/dns/resolver.c
--- bind-9.6.0-P1.pristine/lib/dns/resolver.c 2008-11-06 18:52:34.000000000 -0600
+++ bind-9.6.0-P1/lib/dns/resolver.c 2009-03-16 21:15:44.000000000 -0500
@@ -222,6 +222,7 @@
* is used for EDNS0 black hole detection.
*/
unsigned int timeouts;
+
/*%
* Look aside state for DS lookups.
*/
@@ -245,6 +246,7 @@
*/
isc_uint32_t rand_buf;
isc_uint32_t rand_bits;
+ isc_boolean_t timeout;
};
#define FCTX_MAGIC ISC_MAGIC('F', '!', '!', '!')
@@ -1575,28 +1577,44 @@
DNS_FETCHOPT_NOEDNS0);
}
- /* Sync NOEDNS0 flag in addrinfo->flags and options now */
+ /* Sync NOEDNS0 flag in addrinfo->flags and options now. */
if ((query->addrinfo->flags & DNS_FETCHOPT_NOEDNS0) != 0)
query->options |= DNS_FETCHOPT_NOEDNS0;
/*
+ * Handle timeouts by reducing the UDP response size to 512 bytes
+ * then if that doesn't work disabling EDNS (includes DO) and CD.
+ *
+ * These timeout can be due to:
+ * * broken nameservers that don't respond to EDNS queries.
+ * * broken/misconfigured firewalls and NAT implementations
+ * that don't handle IP fragmentation.
+ * * broken/misconfigured firewalls that don't handle responses
+ * greater than 512 bytes.
+ * * broken/misconfigured firewalls that don't handle EDNS, DO
+ * or CD.
+ * * packet loss / link outage.
+ */
+ if (fctx->timeout) {
+ if ((triededns512(fctx, &query->addrinfo->sockaddr) ||
+ fctx->timeouts >= (MAX_EDNS0_TIMEOUTS * 2)) &&
+ (query->options & DNS_FETCHOPT_NOEDNS0) == 0) {
+ query->options |= DNS_FETCHOPT_NOEDNS0;
+ fctx->reason = "disabling EDNS";
+ } else if ((triededns(fctx, &query->addrinfo->sockaddr) ||
+ fctx->timeouts >= MAX_EDNS0_TIMEOUTS) &&
+ (query->options & DNS_FETCHOPT_NOEDNS0) == 0) {
+ query->options |= DNS_FETCHOPT_EDNS512;
+ fctx->reason = "reducing the advertised EDNS UDP "
+ "packet size to 512 octets";
+ }
+ fctx->timeout = ISC_FALSE;
+ }
+
+ /*
* Use EDNS0, unless the caller doesn't want it, or we know that
* the remote server doesn't like it.
*/
-
- if ((triededns512(fctx, &query->addrinfo->sockaddr) ||
- fctx->timeouts >= (MAX_EDNS0_TIMEOUTS * 2)) &&
- (query->options & DNS_FETCHOPT_NOEDNS0) == 0) {
- query->options |= DNS_FETCHOPT_NOEDNS0;
- fctx->reason = "disabling EDNS";
- } else if ((triededns(fctx, &query->addrinfo->sockaddr) ||
- fctx->timeouts >= MAX_EDNS0_TIMEOUTS) &&
- (query->options & DNS_FETCHOPT_NOEDNS0) == 0) {
- query->options |= DNS_FETCHOPT_EDNS512;
- fctx->reason = "reducing the advertised EDNS UDP packet "
- "size to 512 octets";
- }
-
if ((query->options & DNS_FETCHOPT_NOEDNS0) == 0) {
if ((query->addrinfo->flags & DNS_FETCHOPT_NOEDNS0) == 0) {
unsigned int version = 0; /* Default version. */
@@ -2909,6 +2927,7 @@
isc_result_t result;
fctx->timeouts++;
+ fctx->timeout = ISC_TRUE;
/*
* We could cancel the running queries here, or we could let
* them keep going. Since we normally use separate sockets for
@@ -3242,6 +3261,7 @@
fctx->reason = NULL;
fctx->rand_buf = 0;
fctx->rand_bits = 0;
+ fctx->timeout = ISC_FALSE;
dns_name_init(&fctx->nsname, NULL);
fctx->nsfetch = NULL;
@@ -4508,7 +4528,8 @@
*/
ttl = fctx->res->view->maxncachettl;
if (fctx->type == dns_rdatatype_soa &&
- covers == dns_rdatatype_any)
+ covers == dns_rdatatype_any &&
+ fctx->res->zero_no_soa_ttl)
ttl = 0;
result = ncache_adderesult(fctx->rmessage, fctx->cache, node,
@@ -5768,6 +5789,7 @@
}
fctx->timeouts = 0;
+ fctx->timeout = ISC_FALSE;
/*
* XXXRTH We should really get the current time just once. We
diff -ur bind-9.6.0-P1.pristine/lib/dns/validator.c bind-9.6.0-P1/lib/dns/validator.c
--- bind-9.6.0-P1.pristine/lib/dns/validator.c 2008-11-14 17:47:33.000000000 -0600
+++ bind-9.6.0-P1/lib/dns/validator.c 2009-03-16 21:13:56.000000000 -0500
@@ -218,6 +218,37 @@
return (ISC_TRUE);
}
+/*
+ * Check that we have atleast one supported algorithm in the DLV RRset.
+ */
+static inline isc_boolean_t
+dlv_algorithm_supported(dns_validator_t *val) {
+ dns_rdata_t rdata = DNS_RDATA_INIT;
+ dns_rdata_dlv_t dlv;
+ isc_result_t result;
+
+ for (result = dns_rdataset_first(&val->dlv);
+ result == ISC_R_SUCCESS;
+ result = dns_rdataset_next(&val->dlv)) {
+ dns_rdata_reset(&rdata);
+ dns_rdataset_current(&val->dlv, &rdata);
+ result = dns_rdata_tostruct(&rdata, &dlv, NULL);
+ RUNTIME_CHECK(result == ISC_R_SUCCESS);
+
+ if (!dns_resolver_algorithm_supported(val->view->resolver,
+ val->event->name,
+ dlv.algorithm))
+ continue;
+
+ if (dlv.digest_type != DNS_DSDIGEST_SHA256 &&
+ dlv.digest_type != DNS_DSDIGEST_SHA1)
+ continue;
+
+ return (ISC_TRUE);
+ }
+ return (ISC_FALSE);
+}
+
/*%
* Look in the NSEC record returned from a DS query to see if there is
* a NS RRset at this name. If it is found we are at a delegation point.
@@ -2957,19 +2988,36 @@
sizeof(namebuf));
dns_rdataset_clone(&val->frdataset, &val->dlv);
val->havedlvsep = ISC_TRUE;
- validator_log(val, ISC_LOG_DEBUG(3), "DLV %s found", namebuf);
- dlv_validator_start(val);
+ if (dlv_algorithm_supported(val)) {
+ validator_log(val, ISC_LOG_DEBUG(3), "DLV %s found",
+ namebuf);
+ dlv_validator_start(val);
+ } else {
+ validator_log(val, ISC_LOG_DEBUG(3),
+ "DLV %s found with no supported algorithms",
+ namebuf);
+ markanswer(val);
+ validator_done(val, ISC_R_SUCCESS);
+ }
} else if (eresult == DNS_R_NXRRSET ||
eresult == DNS_R_NXDOMAIN ||
eresult == DNS_R_NCACHENXRRSET ||
eresult == DNS_R_NCACHENXDOMAIN) {
- result = finddlvsep(val, ISC_TRUE);
+ result = finddlvsep(val, ISC_TRUE);
if (result == ISC_R_SUCCESS) {
- dns_name_format(dns_fixedname_name(&val->dlvsep),
- namebuf, sizeof(namebuf));
- validator_log(val, ISC_LOG_DEBUG(3), "DLV %s found",
- namebuf);
- dlv_validator_start(val);
+ if (dlv_algorithm_supported(val)) {
+ dns_name_format(dns_fixedname_name(&val->dlvsep),
+ namebuf, sizeof(namebuf));
+ validator_log(val, ISC_LOG_DEBUG(3),
+ "DLV %s found", namebuf);
+ dlv_validator_start(val);
+ } else {
+ validator_log(val, ISC_LOG_DEBUG(3),
+ "DLV %s found with no supported "
+ "algorithms", namebuf);
+ markanswer(val);
+ validator_done(val, ISC_R_SUCCESS);
+ }
} else if (result == ISC_R_NOTFOUND) {
validator_log(val, ISC_LOG_DEBUG(3), "DLV not found");
markanswer(val);
@@ -3032,9 +3080,16 @@
}
dns_name_format(dns_fixedname_name(&val->dlvsep), namebuf,
sizeof(namebuf));
- validator_log(val, ISC_LOG_DEBUG(3), "DLV %s found", namebuf);
- dlv_validator_start(val);
- return (DNS_R_WAIT);
+ if (dlv_algorithm_supported(val)) {
+ validator_log(val, ISC_LOG_DEBUG(3), "DLV %s found", namebuf);
+ dlv_validator_start(val);
+ return (DNS_R_WAIT);
+ }
+ validator_log(val, ISC_LOG_DEBUG(3), "DLV %s found with no supported "
+ "algorithms", namebuf);
+ markanswer(val);
+ validator_done(val, ISC_R_SUCCESS);
+ return (ISC_R_SUCCESS);
}
/*%

View File

@ -1,3 +1,3 @@
de68e10e91e05ab100be879b5bcaa6cb config-4.tar.bz2 de68e10e91e05ab100be879b5bcaa6cb config-4.tar.bz2
4faa4395b955e5f8a3d50f308b9fabc8 bind-chroot.tar.bz2 4faa4395b955e5f8a3d50f308b9fabc8 bind-chroot.tar.bz2
886b7eae55cfdc8cd8d2ca74a2f99c6e bind-9.6.0-P1.tar.gz 0a77b019db076c0b034d374abe3044ef bind-9.6.1b1.tar.gz