named_add_reserved_dispatch(named_g_server,
cfg_obj_assockaddr(obj));
- obj = NULL;
- result = named_config_get(maps, "alt-transfer-source", &obj);
- INSIST(result == ISC_R_SUCCESS && obj != NULL);
- RETERR(dns_zone_setaltxfrsource4(mayberaw,
- cfg_obj_assockaddr(obj)));
- dscp = cfg_obj_getdscp(obj);
- if (dscp == -1) {
- dscp = named_g_dscp;
- }
- RETERR(dns_zone_setaltxfrsource4dscp(mayberaw, dscp));
-
- obj = NULL;
- result = named_config_get(maps, "alt-transfer-source-v6", &obj);
- INSIST(result == ISC_R_SUCCESS && obj != NULL);
- RETERR(dns_zone_setaltxfrsource6(mayberaw,
- cfg_obj_assockaddr(obj)));
- dscp = cfg_obj_getdscp(obj);
- if (dscp == -1) {
- dscp = named_g_dscp;
- }
- RETERR(dns_zone_setaltxfrsource6dscp(mayberaw, dscp));
-
- obj = NULL;
- (void)named_config_get(maps, "use-alt-transfer-source", &obj);
- if (obj == NULL) {
- /*
- * Default off when views are in use otherwise
- * on for BIND 8 compatibility.
- */
- view = dns_zone_getview(zone);
- if (view != NULL && strcmp(view->name, "_default") == 0)
- {
- alt = true;
- } else {
- alt = false;
- }
- } else {
- alt = cfg_obj_asboolean(obj);
- }
- dns_zone_setoption(mayberaw, DNS_ZONEOPT_USEALTXFRSRC, alt);
-
obj = NULL;
(void)named_config_get(maps, "try-tcp-refresh", &obj);
dns_zone_setoption(mayberaw, DNS_ZONEOPT_TRYTCPREFRESH,
DNS_ZONEOPT_FATALNS = 1 << 4, /*%< DNS_ZONEOPT_CHECKNS is fatal */
DNS_ZONEOPT_MULTIMASTER = 1 << 5, /*%< this zone has multiple
primaries */
- DNS_ZONEOPT_USEALTXFRSRC = 1 << 6, /*%< use alternate transfer sources
- */
+ DNS_ZONEOPT_USEALTXFRSRC = 1 << 6, /*%< use alternate transfer sources.
+ Obsoleted. */
DNS_ZONEOPT_CHECKNAMES = 1 << 7, /*%< check-names */
DNS_ZONEOPT_CHECKNAMESFAIL = 1 << 8, /*%< fatal check-name failures */
DNS_ZONEOPT_CHECKWILDCARD = 1 << 9, /*%< check for internal wildcards */
isc_result_t
dns_zone_setxfrsource4(dns_zone_t *zone, const isc_sockaddr_t *xfrsource);
-isc_result_t
-dns_zone_setaltxfrsource4(dns_zone_t *zone, const isc_sockaddr_t *xfrsource);
/*%<
* Set the source address to be used in IPv4 zone transfers.
*
isc_sockaddr_t *
dns_zone_getxfrsource4(dns_zone_t *zone);
-isc_sockaddr_t *
-dns_zone_getaltxfrsource4(dns_zone_t *zone);
/*%<
* Returns the source address set by a previous dns_zone_setxfrsource4
* call, or the default of inaddr_any, port 0.
isc_result_t
dns_zone_setxfrsource4dscp(dns_zone_t *zone, isc_dscp_t dscp);
-isc_result_t
-dns_zone_setaltxfrsource4dscp(dns_zone_t *zone, isc_dscp_t dscp);
/*%<
- * Set the DSCP value associated with the transfer/alt-transfer source.
+ * Set the DSCP value associated with the transfer source.
*
* Require:
*\li 'zone' to be a valid zone.
isc_dscp_t
dns_zone_getxfrsource4dscp(dns_zone_t *zone);
-isc_dscp_t
-dns_zone_getaltxfrsource4dscp(dns_zone_t *zone);
/*%/
- * Get the DSCP value associated with the transfer/alt-transfer source.
+ * Get the DSCP value associated with the transfer source.
*
* Require:
*\li 'zone' to be a valid zone.
isc_result_t
dns_zone_setxfrsource6(dns_zone_t *zone, const isc_sockaddr_t *xfrsource);
-isc_result_t
-dns_zone_setaltxfrsource6(dns_zone_t *zone, const isc_sockaddr_t *xfrsource);
/*%<
* Set the source address to be used in IPv6 zone transfers.
*
isc_sockaddr_t *
dns_zone_getxfrsource6(dns_zone_t *zone);
-isc_sockaddr_t *
-dns_zone_getaltxfrsource6(dns_zone_t *zone);
/*%<
* Returns the source address set by a previous dns_zone_setxfrsource6
* call, or the default of in6addr_any, port 0.
isc_dscp_t
dns_zone_getxfrsource6dscp(dns_zone_t *zone);
-isc_dscp_t
-dns_zone_getaltxfrsource6dscp(dns_zone_t *zone);
/*%/
- * Get the DSCP value associated with the transfer/alt-transfer source.
+ * Get the DSCP value associated with the transfer source.
*
* Require:
*\li 'zone' to be a valid zone.
isc_result_t
dns_zone_setxfrsource6dscp(dns_zone_t *zone, isc_dscp_t dscp);
-isc_result_t
-dns_zone_setaltxfrsource6dscp(dns_zone_t *zone, isc_dscp_t dscp);
/*%<
- * Set the DSCP value associated with the transfer/alt-transfer source.
+ * Set the DSCP value associated with the transfer source.
*
* Require:
*\li 'zone' to be a valid zone.
isc_sockaddr_t parentalsrc6;
isc_sockaddr_t xfrsource4;
isc_sockaddr_t xfrsource6;
- isc_sockaddr_t altxfrsource4;
- isc_sockaddr_t altxfrsource6;
isc_sockaddr_t sourceaddr;
isc_dscp_t notifysrc4dscp;
isc_dscp_t notifysrc6dscp;
isc_dscp_t parentalsrc6dscp;
isc_dscp_t xfrsource4dscp;
isc_dscp_t xfrsource6dscp;
- isc_dscp_t altxfrsource4dscp;
- isc_dscp_t altxfrsource6dscp;
dns_xfrin_ctx_t *xfr; /* task locked */
dns_tsigkey_t *tsigkey; /* key used for xfr */
DNS_ZONEFLG_NOIXFR = 0x00100000U, /*%< IXFR failed, force AXFR */
DNS_ZONEFLG_FLUSH = 0x00200000U,
DNS_ZONEFLG_NOEDNS = 0x00400000U,
- DNS_ZONEFLG_USEALTXFRSRC = 0x00800000U,
+ DNS_ZONEFLG_USEALTXFRSRC = 0x00800000U, /*%< Obsoleted. */
DNS_ZONEFLG_SOABEFOREAXFR = 0x01000000U,
DNS_ZONEFLG_NEEDCOMPACT = 0x02000000U,
DNS_ZONEFLG_REFRESHING = 0x04000000U, /*%< Refreshing keydata */
.parentalsrc6dscp = -1,
.xfrsource4dscp = -1,
.xfrsource6dscp = -1,
- .altxfrsource4dscp = -1,
- .altxfrsource6dscp = -1,
.maxxfrin = MAX_XFER_TIME,
.maxxfrout = MAX_XFER_TIME,
.sigvalidityinterval = 30 * 24 * 3600,
isc_sockaddr_any6(&zone->parentalsrc6);
isc_sockaddr_any(&zone->xfrsource4);
isc_sockaddr_any6(&zone->xfrsource6);
- isc_sockaddr_any(&zone->altxfrsource4);
- isc_sockaddr_any6(&zone->altxfrsource6);
ISC_LINK_INIT(zone, statelink);
ISC_LIST_INIT(zone->signing);
ISC_LIST_INIT(zone->nsec3chain);
return (ISC_R_SUCCESS);
}
-isc_result_t
-dns_zone_setaltxfrsource4(dns_zone_t *zone,
- const isc_sockaddr_t *altxfrsource) {
- REQUIRE(DNS_ZONE_VALID(zone));
-
- LOCK_ZONE(zone);
- zone->altxfrsource4 = *altxfrsource;
- UNLOCK_ZONE(zone);
-
- return (ISC_R_SUCCESS);
-}
-
-isc_sockaddr_t *
-dns_zone_getaltxfrsource4(dns_zone_t *zone) {
- REQUIRE(DNS_ZONE_VALID(zone));
- return (&zone->altxfrsource4);
-}
-
-isc_result_t
-dns_zone_setaltxfrsource4dscp(dns_zone_t *zone, isc_dscp_t dscp) {
- REQUIRE(DNS_ZONE_VALID(zone));
-
- LOCK_ZONE(zone);
- zone->altxfrsource4dscp = dscp;
- UNLOCK_ZONE(zone);
-
- return (ISC_R_SUCCESS);
-}
-
-isc_dscp_t
-dns_zone_getaltxfrsource4dscp(dns_zone_t *zone) {
- REQUIRE(DNS_ZONE_VALID(zone));
- return (zone->altxfrsource4dscp);
-}
-
-isc_result_t
-dns_zone_setaltxfrsource6(dns_zone_t *zone,
- const isc_sockaddr_t *altxfrsource) {
- REQUIRE(DNS_ZONE_VALID(zone));
-
- LOCK_ZONE(zone);
- zone->altxfrsource6 = *altxfrsource;
- UNLOCK_ZONE(zone);
-
- return (ISC_R_SUCCESS);
-}
-
-isc_sockaddr_t *
-dns_zone_getaltxfrsource6(dns_zone_t *zone) {
- REQUIRE(DNS_ZONE_VALID(zone));
- return (&zone->altxfrsource6);
-}
-
-isc_result_t
-dns_zone_setaltxfrsource6dscp(dns_zone_t *zone, isc_dscp_t dscp) {
- REQUIRE(DNS_ZONE_VALID(zone));
-
- LOCK_ZONE(zone);
- zone->altxfrsource6dscp = dscp;
- UNLOCK_ZONE(zone);
-
- return (ISC_R_SUCCESS);
-}
-
-isc_dscp_t
-dns_zone_getaltxfrsource6dscp(dns_zone_t *zone) {
- REQUIRE(DNS_ZONE_VALID(zone));
- return (zone->altxfrsource6dscp);
-}
-
isc_result_t
dns_zone_setparentalsrc4(dns_zone_t *zone, const isc_sockaddr_t *parentalsrc) {
REQUIRE(DNS_ZONE_VALID(zone));
}
DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_REFRESH);
DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NOEDNS);
- DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_USEALTXFRSRC);
if ((oldflags & (DNS_ZONEFLG_REFRESH | DNS_ZONEFLG_LOADING)) != 0) {
return;
}
dns_remote_next(&zone->primaries, true);
DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NOEDNS);
if (exiting || dns_remote_done(&zone->primaries)) {
- bool done = true;
- if (!exiting &&
- DNS_ZONE_OPTION(zone, DNS_ZONEOPT_USEALTXFRSRC) &&
- !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_USEALTXFRSRC))
- {
- /*
- * Did we get a good answer from all the primaries?
- */
- done = dns_remote_allgood(&zone->primaries);
- }
- if (!done) {
- dns_remote_reset(&zone->primaries, false);
-
- /*
- * Find the next failed primary.
- */
- if (dns_remote_addrok(&zone->primaries)) {
- dns_remote_next(&zone->primaries, true);
- }
- DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_USEALTXFRSRC);
- } else {
- DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_REFRESH);
-
- zone_settimer(zone, &now);
- goto free_stub;
- }
+ DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_REFRESH);
+ zone_settimer(zone, &now);
+ goto free_stub;
}
queue_soa_query(zone);
goto free_stub;
dns_remote_next(&zone->primaries, true);
DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NOEDNS);
if (dns_remote_done(&zone->primaries)) {
- bool done = true;
- if (DNS_ZONE_OPTION(zone, DNS_ZONEOPT_USEALTXFRSRC) &&
- !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_USEALTXFRSRC))
- {
- /*
- * Did we get a good answer from all the primaries?
- */
- done = dns_remote_allgood(&zone->primaries);
- }
- if (!done) {
- DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_USEALTXFRSRC);
- dns_remote_reset(&zone->primaries, false);
- /*
- * Find the next failed primary.
- */
- if (dns_remote_addrok(&zone->primaries)) {
- dns_remote_next(&zone->primaries, true);
- }
- goto requeue;
- }
DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_REFRESH);
if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDREFRESH)) {
DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NEEDREFRESH);
zone->refreshtime = now;
}
- DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_USEALTXFRSRC);
zone_settimer(zone, &now);
goto detach;
}
-requeue:
queue_soa_query(zone);
goto detach;
same_primary:
if (dns_remote_done(&zone->primaries)) {
dns_remote_reset(&zone->primaries, false);
- if (DNS_ZONE_OPTION(zone, DNS_ZONEOPT_USEALTXFRSRC) &&
- !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_USEALTXFRSRC))
- {
- DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_REFRESH);
- DNS_ZONE_SETFLAG(zone,
- DNS_ZONEFLG_USEALTXFRSRC);
- if (dns_remote_addrok(&zone->primaries)) {
- dns_remote_next(&zone->primaries, true);
- }
- again = true;
- } else {
- DNS_ZONE_CLRFLAG(zone,
- DNS_ZONEFLG_USEALTXFRSRC);
- }
} else {
DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_REFRESH);
again = true;
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "alt-transfer-source", &cfg_type_sockaddr4wild,
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR |
- CFG_CLAUSEFLAG_DEPRECATED },
+ CFG_CLAUSEFLAG_ANCIENT },
{ "alt-transfer-source-v6", &cfg_type_sockaddr6wild,
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR |
- CFG_CLAUSEFLAG_DEPRECATED },
+ CFG_CLAUSEFLAG_ANCIENT },
{ "auto-dnssec", &cfg_type_autodnssec,
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_CLAUSEFLAG_DEPRECATED },
{ "check-dup-records", &cfg_type_checkmode, CFG_ZONE_PRIMARY },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "use-alt-transfer-source", &cfg_type_boolean,
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB |
- CFG_CLAUSEFLAG_DEPRECATED },
+ CFG_CLAUSEFLAG_ANCIENT },
{ "zero-no-soa-ttl", &cfg_type_boolean,
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "zone-statistics", &cfg_type_zonestat,