From 72166c5cf59db011cce11e98abe377f5aa6f7052 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Mon, 20 Mar 2000 19:40:04 +0000 Subject: [PATCH] made 'support-ixfr' a synonym for 'request-ixfr' --- lib/dns/config/confcommon.c | 6 ------ lib/dns/config/confparser.y | 11 +++++++---- lib/dns/peer.c | 37 +------------------------------------ 3 files changed, 8 insertions(+), 46 deletions(-) diff --git a/lib/dns/config/confcommon.c b/lib/dns/config/confcommon.c index 11c003c7ce..e0d4539400 100644 --- a/lib/dns/config/confcommon.c +++ b/lib/dns/config/confcommon.c @@ -664,12 +664,6 @@ dns_c_peer_print(FILE *fp, int indent, dns_peer_t *peer) fprintf(fp, "transfers %d;\n", ival); } - res = dns_peer_getsupportixfr(peer, &bval); - if (res == ISC_R_SUCCESS) { - dns_c_printtabs(fp, indent + 1); - fprintf(fp, "support-ixfr %s;\n", (bval ? "true" : "false")); - } - res = dns_peer_getprovideixfr(peer, &bval); if (res == ISC_R_SUCCESS) { dns_c_printtabs(fp, indent + 1); diff --git a/lib/dns/config/confparser.y b/lib/dns/config/confparser.y index 3b79fa3722..10cb2d6987 100644 --- a/lib/dns/config/confparser.y +++ b/lib/dns/config/confparser.y @@ -16,7 +16,7 @@ * SOFTWARE. */ -/* $Id: confparser.y,v 1.50 2000/03/19 02:58:13 brister Exp $ */ +/* $Id: confparser.y,v 1.51 2000/03/20 19:39:15 gson Exp $ */ #include @@ -2192,20 +2192,23 @@ server_info: L_BOGUS yea_or_nay } | L_SUPPORT_IXFR yea_or_nay { + /* + * Backwards compatibility, equivalent to provide-ixfr + */ dns_peer_t *peer = NULL; dns_peerlist_currpeer(currcfg->peers, &peer); INSIST(peer != NULL); - tmpres = dns_peer_setsupportixfr(peer, $2); + tmpres = dns_peer_setprovideixfr(peer, $2); dns_peer_detach(&peer); if (tmpres == ISC_R_EXISTS) { parser_warning(ISC_FALSE, - "redefining peer support-ixfr value"); + "redefining peer provide-ixfr value"); } else if(tmpres != ISC_R_SUCCESS) { parser_error(ISC_FALSE, "error setting peer " - "support-ixfr value"); + "provide-ixfr value"); YYABORT; } } diff --git a/lib/dns/peer.c b/lib/dns/peer.c index f39f3a683d..d146c972f7 100644 --- a/lib/dns/peer.c +++ b/lib/dns/peer.c @@ -36,9 +36,8 @@ #define BOGUS_BIT 0 #define SERVER_TRANSFER_FORMAT_BIT 1 #define TRANSFERS_BIT 2 -#define SUPPORT_IXFR_BIT 3 +#define PROVIDE_IXFR_BIT 3 #define REQUEST_IXFR_BIT 4 -#define PROVIDE_IXFR_BIT 5 static isc_result_t dns_peerlist_delete(dns_peerlist_t **list); static isc_result_t dns_peer_delete(dns_peer_t **peer); @@ -216,7 +215,6 @@ dns_peer_new(isc_mem_t *mem, isc_netaddr_t *addr, dns_peer_t **peerptr) peer->bogus = ISC_FALSE; peer->transfer_format = dns_one_answer; peer->transfers = 0; - peer->support_ixfr = ISC_FALSE; peer->request_ixfr = ISC_FALSE; peer->provide_ixfr = ISC_FALSE; peer->key = NULL; @@ -334,39 +332,6 @@ dns_peer_getbogus(dns_peer_t *peer, } -isc_result_t -dns_peer_setsupportixfr(dns_peer_t *peer, - isc_boolean_t newval) -{ - isc_boolean_t existed; - - REQUIRE(DNS_PEER_VALID(peer)); - - existed = DNS_CHECKBIT(SUPPORT_IXFR_BIT, &peer->bitflags); - - peer->support_ixfr = newval; - DNS_SETBIT(SUPPORT_IXFR_BIT, &peer->bitflags); - - return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS); -} - - -isc_result_t -dns_peer_getsupportixfr(dns_peer_t *peer, - isc_boolean_t *retval) -{ - REQUIRE(DNS_PEER_VALID(peer)); - REQUIRE(retval != NULL); - - if (DNS_CHECKBIT(SUPPORT_IXFR_BIT, &peer->bitflags)) { - *retval = peer->support_ixfr; - return (ISC_R_SUCCESS); - } else { - return (ISC_R_NOTFOUND); - } -} - - isc_result_t dns_peer_setprovideixfr(dns_peer_t *peer, isc_boolean_t newval)