diff --git a/CHANGES b/CHANGES index 14b84871ec..31f689b85b 100644 --- a/CHANGES +++ b/CHANGES @@ -161,6 +161,9 @@ 1685. [bug] Change #1679 loop tests weren't quite right. +1684. [func] ixfr-from-differences now takes master and slave in + addition to yes and no at the options and view levels. + 1683. [bug] dig +sigchase could leak memory. [RT #11445] 1682. [port] Update configure test for (long long) printf format. diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index 837350bd75..4af2e700ba 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zoneconf.c,v 1.110.18.3 2004/10/07 02:15:27 marka Exp $ */ +/* $Id: zoneconf.c,v 1.110.18.4 2004/10/14 00:51:32 marka Exp $ */ #include @@ -337,6 +337,7 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig, isc_boolean_t alt; dns_view_t *view; isc_boolean_t check = ISC_FALSE, fail = ISC_FALSE; + isc_boolean_t ixfrdiff; i = 0; if (zconfig != NULL) { @@ -535,8 +536,17 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig, obj = NULL; result = ns_config_get(maps, "ixfr-from-differences", &obj); INSIST(result == ISC_R_SUCCESS); - dns_zone_setoption(zone, DNS_ZONEOPT_IXFRFROMDIFFS, - cfg_obj_asboolean(obj)); + if (cfg_obj_isboolean(obj)) + ixfrdiff = cfg_obj_asboolean(obj); + else if (strcasecmp(cfg_obj_asstring(obj), "master") && + ztype == dns_zone_master) + ixfrdiff = ISC_TRUE; + else if (strcasecmp(cfg_obj_asstring(obj), "slave") && + ztype == dns_zone_slave) + ixfrdiff = ISC_TRUE; + else + ixfrdiff = ISC_FALSE; + dns_zone_setoption(zone, DNS_ZONEOPT_IXFRFROMDIFFS, ixfrdiff); checknames(ztype, maps, &obj); INSIST(obj != NULL); diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml index 7f48e8bbe8..96d6c630f9 100644 --- a/doc/arm/Bv9ARM-book.xml +++ b/doc/arm/Bv9ARM-book.xml @@ -2,7 +2,7 @@ - + BIND 9 Administrator Reference Manual @@ -3318,6 +3318,11 @@ will be of a size comparable to the combined size of the old and new zone version, and the server will need to temporarily allocate memory to hold this complete difference set. + +ixfr-from-differences also accepts master +and slave at the view and options levels which causes +ixfr-from-differences to apply to all master +or slave zones respectively. multi-master diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index 33d71e8556..77badf4672 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: namedconf.c,v 1.30.18.7 2004/10/07 02:15:30 marka Exp $ */ +/* $Id: namedconf.c,v 1.30.18.8 2004/10/14 00:51:33 marka Exp $ */ #include @@ -70,12 +70,13 @@ static cfg_type_t cfg_type_acl; static cfg_type_t cfg_type_addrmatchelt; static cfg_type_t cfg_type_bracketed_aml; static cfg_type_t cfg_type_bracketed_namesockaddrkeylist; -static cfg_type_t cfg_type_bracketed_sockaddrnameportlist; static cfg_type_t cfg_type_bracketed_sockaddrlist; +static cfg_type_t cfg_type_bracketed_sockaddrnameportlist; static cfg_type_t cfg_type_controls; static cfg_type_t cfg_type_controls_sockaddr; static cfg_type_t cfg_type_destinationlist; static cfg_type_t cfg_type_dialuptype; +static cfg_type_t cfg_type_ixfrdifftype; static cfg_type_t cfg_type_key; static cfg_type_t cfg_type_logfile; static cfg_type_t cfg_type_logging; @@ -729,6 +730,7 @@ view_clauses[] = { { "dnssec-lookaside", &cfg_type_lookaside, CFG_CLAUSEFLAG_MULTI }, { "dnssec-must-be-secure", &cfg_type_mustbesecure, CFG_CLAUSEFLAG_MULTI }, + { "ixfr-from-differences", &cfg_type_ixfrdifftype, 0 }, { NULL, NULL, 0 } }; @@ -760,7 +762,6 @@ zone_clauses[] = { { "dialup", &cfg_type_dialuptype, 0 }, { "forward", &cfg_type_forwardtype, 0 }, { "forwarders", &cfg_type_portiplist, 0 }, - { "ixfr-from-differences", &cfg_type_boolean, 0 }, { "maintain-ixfr-base", &cfg_type_boolean, CFG_CLAUSEFLAG_OBSOLETE }, { "max-ixfr-log-size", &cfg_type_size, CFG_CLAUSEFLAG_OBSOLETE }, { "max-journal-size", &cfg_type_sizenodefault, 0 }, @@ -807,6 +808,7 @@ zone_only_clauses[] = { * the zone options and the global/view options. Ugh. */ { "check-names", &cfg_type_checkmode, 0 }, + { "ixfr-from-differences", &cfg_type_boolean, 0 }, { NULL, NULL, 0 } }; @@ -1173,6 +1175,16 @@ static cfg_type_t cfg_type_notifytype = { &cfg_rep_string, notify_enums, }; +static const char *ixfrdiff_enums[] = { "master", "slave", NULL }; +static isc_result_t +parse_ixfrdiff_type(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) { + return (parse_enum_or_other(pctx, type, &cfg_type_boolean, ret)); +} +static cfg_type_t cfg_type_ixfrdifftype = { + "ixfrdiff", parse_ixfrdiff_type, cfg_print_ustring, doc_enum_or_other, + &cfg_rep_string, ixfrdiff_enums, +}; + static keyword_type_t key_kw = { "key", &cfg_type_astring }; LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_keyref = {