diff --git a/CHANGES b/CHANGES index 394b332f74..2e18766996 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +2035. [func] Make falling back to TCP on UDP refresh failure + optional. Default "try-tcp-refresh yes;" for BIND 8 + compatibility. [RT #16123] + 2034. [bug] gcc: set -fno-strict-aliasing. [RT #16124] 2033. [bug] We wern't creating multiple client memory contexts diff --git a/bin/named/config.c b/bin/named/config.c index 856d2f48dd..8d3571248f 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: config.c,v 1.74 2006/05/03 01:54:53 marka Exp $ */ +/* $Id: config.c,v 1.75 2006/06/04 23:17:06 marka Exp $ */ /*! \file */ @@ -178,6 +178,7 @@ options {\n\ check-srv-cname warn;\n\ zero-no-soa-ttl yes;\n\ update-check-ksk yes;\n\ + try-tcp-refresh yes; /* BIND 8 compat */\n\ };\n\ " diff --git a/bin/named/named.conf.docbook b/bin/named/named.conf.docbook index 3fc54dac7e..2978ce1e12 100644 --- a/bin/named/named.conf.docbook +++ b/bin/named/named.conf.docbook @@ -17,7 +17,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + Aug 13, 2004 @@ -321,6 +321,7 @@ options { zone-statistics boolean; key-directory quoted_string; + try-tcp-refresh boolean; zero-no-soa-ttl boolean; zero-no-soa-ttl-cache boolean; @@ -468,6 +469,7 @@ view string optional_class use-alt-transfer-source boolean; zone-statistics boolean; + try-tcp-refresh boolean; key-directory quoted_string; zero-no-soa-ttl boolean; zero-no-soa-ttl-cache boolean; @@ -554,6 +556,7 @@ zone string optional_class use-alt-transfer-source boolean; zone-statistics boolean; + try-tcp-refresh boolean; key-directory quoted_string; ixfr-base quoted_string; // obsolete diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index 4866374a83..72cd962542 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zoneconf.c,v 1.133 2006/05/16 03:35:56 marka Exp $ */ +/* $Id: zoneconf.c,v 1.134 2006/06/04 23:17:06 marka Exp $ */ /*% */ @@ -876,6 +876,10 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, alt = cfg_obj_asboolean(obj); dns_zone_setoption(zone, DNS_ZONEOPT_USEALTXFRSRC, alt); + obj = NULL; + (void)ns_config_get(maps, "try-tcp-refresh", &obj); + dns_zone_setoption(zone, DNS_ZONEOPT_TRYTCPREFRESH, + cfg_obj_asboolean(obj)); break; default: diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml index 5bd6c312f1..91ef76ec15 100644 --- a/doc/arm/Bv9ARM-book.xml +++ b/doc/arm/Bv9ARM-book.xml @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + BIND 9 Administrator Reference Manual @@ -4419,6 +4419,7 @@ category notify { null; }; allow-update { address_match_list }; allow-update-forwarding { address_match_list }; update-check-ksk yes_or_no; + try-tcp-refresh yes_or_no; allow-v6-synthesis { address_match_list }; blackhole { address_match_list }; avoid-v4-udp-ports { port_list }; @@ -5671,6 +5672,16 @@ options { + + try-tcp-refresh + + + Try to refresh the zone using TCP if UDP queries fail. + The default is yes. + + + + @@ -8041,6 +8052,7 @@ zone zone_name class allow-transfer { address_match_list }; allow-update-forwarding { address_match_list }; update-check-ksk yes_or_no; + try-tcp-refresh yes_or_no; also-notify { ip_addr port ip_port ; ip_addr port ip_port ; ... }; check-names (warn|fail|ignore) ; dialup dialup_option ; @@ -8525,6 +8537,16 @@ zone zone_name class + + try-tcp-refresh + + + See the description of + try-tcp-refresh in . + + + + database diff --git a/lib/bind9/check.c b/lib/bind9/check.c index 5db9b81ac2..b052a50ab5 100644 --- a/lib/bind9/check.c +++ b/lib/bind9/check.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: check.c,v 1.74 2006/03/10 05:00:23 marka Exp $ */ +/* $Id: check.c,v 1.75 2006/06/04 23:17:06 marka Exp $ */ /*! \file */ @@ -934,6 +934,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions, { "check-srv-cname", MASTERZONE }, { "masterfile-format", MASTERZONE | SLAVEZONE | STUBZONE | HINTZONE }, { "update-check-ksk", MASTERZONE }, + { "try-tcp-refresh", SLAVEZONE }, }; static optionstable dialups[] = { diff --git a/lib/dns/include/dns/zone.h b/lib/dns/include/dns/zone.h index c2a1bf499a..6e98c9996e 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.144 2006/03/06 01:27:52 marka Exp $ */ +/* $Id: zone.h,v 1.145 2006/06/04 23:17:07 marka Exp $ */ #ifndef DNS_ZONE_H #define DNS_ZONE_H 1 @@ -66,6 +66,7 @@ typedef enum { #define DNS_ZONEOPT_WARNSRVCNAME 0x00200000U /*%< warn on SRV CNAME check */ #define DNS_ZONEOPT_IGNORESRVCNAME 0x00400000U /*%< ignore SRV CNAME check */ #define DNS_ZONEOPT_UPDATECHECKKSK 0x00800000U /*%< check dnskey KSK flag */ +#define DNS_ZONEOPT_TRYTCPREFRESH 0x01000000U /*%< try tcp refresh on udp failure */ #ifndef NOMINUM_PUBLIC /* diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 22b483777a..6f65db39ed 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zone.c,v 1.455 2006/05/18 02:35:26 marka Exp $ */ +/* $Id: zone.c,v 1.456 2006/06/04 23:17:06 marka Exp $ */ /*! \file */ @@ -4285,7 +4285,8 @@ refresh_callback(isc_task_t *task, isc_event_t *event) { "master %s exceeded (source %s)", master, source); /* Try with slave with TCP. */ - if (zone->type == dns_zone_slave) + if (zone->type == dns_zone_slave && + DNS_ZONE_OPTION(zone, DNS_ZONEOPT_TRYTCPREFRESH)) goto tcp_transfer; } else dns_zone_log(zone, ISC_LOG_INFO, diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index cc34ec864c..2c691f5f68 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: namedconf.c,v 1.69 2006/05/03 01:54:54 marka Exp $ */ +/* $Id: namedconf.c,v 1.70 2006/06/04 23:17:07 marka Exp $ */ /*! \file */ @@ -846,6 +846,7 @@ zone_clauses[] = { { "check-sibling", &cfg_type_boolean, 0 }, { "zero-no-soa-ttl", &cfg_type_boolean, 0 }, { "update-check-ksk", &cfg_type_boolean, 0 }, + { "try-tcp-refresh", &cfg_type_boolean, 0 }, { NULL, NULL, 0 } };