2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 21:17:54 +00:00

remove nonfunctional DSCP implementation

DSCP has not been fully working since the network manager was
introduced in 9.16, and has been completely broken since 9.18.
This seems to have caused very few difficulties for anyone,
so we have now marked it as obsolete and removed the
implementation.

To ensure that old config files don't fail, the code to parse
dscp key-value pairs is still present, but a warning is logged
that the feature is obsolete and should not be used. Nothing is
done with configured values, and there is no longer any
range checking.

(cherry picked from commit 916ea26ead9b3aa97ca2687f43c86adaa6ea164d)
This commit is contained in:
Evan Hunt 2023-01-05 22:18:55 -08:00
parent 703c799376
commit 5fd93c66aa
111 changed files with 431 additions and 2506 deletions

View File

@ -212,9 +212,6 @@ help(void) {
"from ipv4only.arpa)\n"
" +[no]dnssec (Request DNSSEC records)\n"
" +domain=### (Set default domainname)\n"
" +[no]dscp[=###] (Set the DSCP value to "
"### "
"[0..63])\n"
" +[no]edns[=###] (Set EDNS version) [0]\n"
" +ednsflags=### (Set EDNS flag bits)\n"
" +[no]ednsnegotiation (Set EDNS version "
@ -1400,20 +1397,10 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
strlcpy(domainopt, value, sizeof(domainopt));
break;
case 's': /* dscp */
/* obsolete */
FULLCHECK("dscp");
if (!state) {
lookup->dscp = -1;
break;
}
if (value == NULL) {
goto need_value;
}
result = parse_uint(&num, value, 0x3f, "DSCP");
if (result != ISC_R_SUCCESS) {
warn("Couldn't parse DSCP value");
goto exit_or_usage;
}
lookup->dscp = num;
fprintf(stderr, ";; +dscp option is obsolete "
"and has no effect");
break;
default:
goto invalid_option;

View File

@ -349,9 +349,8 @@ abbreviation is unambiguous; for example, :option:`+cd` is equivalent to
.. option:: +dscp=value
This option sets the DSCP code point to be used when sending the query. Valid DSCP
code points are in the range [0...63]. By default no code point is
explicitly set.
This option formerly set the DSCP value used when sending a query.
It is now obsolete, and has no effect.
.. option:: +edns[=#], +noedns

View File

@ -636,7 +636,6 @@ make_empty_lookup(void) {
.section_authority = true,
.section_additional = true,
.ednsneg = true,
.dscp = -1,
};
dns_fixedname_init(&looknew->fdomain);
@ -811,7 +810,6 @@ clone_lookup(dig_lookup_t *lookold, bool servers) {
looknew->tsigctx = NULL;
looknew->need_search = lookold->need_search;
looknew->done_as_is = lookold->done_as_is;
looknew->dscp = lookold->dscp;
looknew->rrcomments = lookold->rrcomments;
looknew->fuzzing = lookold->fuzzing;
looknew->fuzztime = lookold->fuzztime;
@ -3094,10 +3092,7 @@ start_tcp(dig_query_t *query) {
&query->sockaddr, tcp_connected,
connectquery, local_timeout, 0);
}
/* XXX: set DSCP */
}
return;
failure_tls:
if (query->lookup->tls_key_file_set != query->lookup->tls_cert_file_set)

View File

@ -166,7 +166,6 @@ struct dig_lookup {
char *cookie;
dns_ednsopt_t *ednsopts;
unsigned int ednsoptscnt;
isc_dscp_t dscp;
unsigned int ednsflags;
dns_opcode_t opcode;
int rrcomments;

View File

@ -507,19 +507,16 @@ named_config_getzonetype(const cfg_obj_t *zonetypeobj) {
isc_result_t
named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
in_port_t defport, isc_mem_t *mctx,
isc_sockaddr_t **addrsp, isc_dscp_t **dscpsp,
uint32_t *countp) {
isc_sockaddr_t **addrsp, uint32_t *countp) {
int count, i = 0;
const cfg_obj_t *addrlist;
const cfg_obj_t *portobj, *dscpobj;
const cfg_listelt_t *element;
isc_sockaddr_t *addrs;
const cfg_obj_t *addrlist = NULL;
const cfg_obj_t *portobj = NULL;
const cfg_listelt_t *element = NULL;
isc_sockaddr_t *addrs = NULL;
in_port_t port;
isc_dscp_t dscp = -1, *dscps = NULL;
isc_result_t result;
INSIST(addrsp != NULL && *addrsp == NULL);
INSIST(dscpsp == NULL || *dscpsp == NULL);
INSIST(countp != NULL);
addrlist = cfg_tuple_get(list, "addresses");
@ -543,22 +540,6 @@ named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
}
}
if (dscpsp != NULL) {
dscpobj = cfg_tuple_get(list, "dscp");
if (dscpobj != NULL && cfg_obj_isuint32(dscpobj)) {
if (cfg_obj_asuint32(dscpobj) > 63) {
cfg_obj_log(dscpobj, named_g_lctx,
ISC_LOG_ERROR,
"dscp value '%u' is out of range",
cfg_obj_asuint32(dscpobj));
return (ISC_R_RANGE);
}
dscp = (isc_dscp_t)cfg_obj_asuint32(dscpobj);
}
dscps = isc_mem_get(mctx, count * sizeof(isc_dscp_t));
}
addrs = isc_mem_get(mctx, count * sizeof(isc_sockaddr_t));
for (element = cfg_list_first(addrlist); element != NULL;
@ -568,14 +549,6 @@ named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
INSIST(i < count);
addr = cfg_listelt_value(element);
addrs[i] = *cfg_obj_assockaddr(addr);
if (dscpsp != NULL) {
isc_dscp_t innerdscp;
innerdscp = cfg_obj_getdscp(addr);
if (innerdscp == -1) {
innerdscp = dscp;
}
dscps[i] = innerdscp;
}
if (isc_sockaddr_getport(&addrs[i]) == 0) {
isc_sockaddr_setport(&addrs[i], port);
}
@ -585,26 +558,16 @@ named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
*addrsp = addrs;
*countp = count;
if (dscpsp != NULL) {
*dscpsp = dscps;
}
return (ISC_R_SUCCESS);
}
void
named_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
isc_dscp_t **dscpsp, uint32_t count) {
uint32_t count) {
INSIST(addrsp != NULL && *addrsp != NULL);
INSIST(dscpsp == NULL || *dscpsp != NULL);
isc_mem_put(mctx, *addrsp, count * sizeof(isc_sockaddr_t));
*addrsp = NULL;
if (dscpsp != NULL) {
isc_mem_put(mctx, *dscpsp, count * sizeof(isc_dscp_t));
*dscpsp = NULL;
}
}
static isc_result_t
@ -722,30 +685,28 @@ isc_result_t
named_config_getipandkeylist(const cfg_obj_t *config, const char *listtype,
const cfg_obj_t *list, isc_mem_t *mctx,
dns_ipkeylist_t *ipkl) {
uint32_t addrcount = 0, dscpcount = 0, keycount = 0, tlscount = 0,
i = 0;
uint32_t addrcount = 0, keycount = 0, tlscount = 0, i = 0;
uint32_t listcount = 0, l = 0, j;
uint32_t stackcount = 0, pushed = 0;
isc_result_t result;
const cfg_listelt_t *element;
const cfg_obj_t *addrlist;
const cfg_obj_t *portobj;
const cfg_obj_t *dscpobj;
in_port_t port = (in_port_t)0;
in_port_t def_port;
in_port_t def_tlsport;
isc_dscp_t dscp = -1;
isc_sockaddr_t *addrs = NULL;
isc_dscp_t *dscps = NULL;
dns_name_t **keys = NULL;
dns_name_t **tlss = NULL;
struct {
const char *name;
in_port_t port;
isc_sockaddr_t *src4s;
isc_sockaddr_t *src6s;
} *lists = NULL;
struct {
const cfg_listelt_t *element;
in_port_t port;
isc_dscp_t dscp;
} *stack = NULL;
REQUIRE(ipkl != NULL);
@ -753,7 +714,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const char *listtype,
REQUIRE(ipkl->addrs == NULL);
REQUIRE(ipkl->keys == NULL);
REQUIRE(ipkl->tlss == NULL);
REQUIRE(ipkl->dscps == NULL);
REQUIRE(ipkl->labels == NULL);
REQUIRE(ipkl->allocated == 0);
@ -770,15 +730,9 @@ named_config_getipandkeylist(const cfg_obj_t *config, const char *listtype,
goto cleanup;
}
result = named_config_getdscp(config, &dscp);
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
newlist:
addrlist = cfg_tuple_get(list, "addresses");
portobj = cfg_tuple_get(list, "port");
dscpobj = cfg_tuple_get(list, "dscp");
if (cfg_obj_isuint32(portobj)) {
uint32_t val = cfg_obj_asuint32(portobj);
@ -791,17 +745,6 @@ newlist:
port = (in_port_t)val;
}
if (dscpobj != NULL && cfg_obj_isuint32(dscpobj)) {
if (cfg_obj_asuint32(dscpobj) > 63) {
cfg_obj_log(dscpobj, named_g_lctx, ISC_LOG_ERROR,
"dscp value '%u' is out of range",
cfg_obj_asuint32(dscpobj));
result = ISC_R_RANGE;
goto cleanup;
}
dscp = (isc_dscp_t)cfg_obj_asuint32(dscpobj);
}
result = ISC_R_NOMEMORY;
element = cfg_list_first(addrlist);
@ -855,21 +798,15 @@ resume:
*/
stack[pushed].element = cfg_list_next(element);
stack[pushed].port = port;
stack[pushed].dscp = dscp;
pushed++;
goto newlist;
}
grow_array(mctx, addrs, i, addrcount);
grow_array(mctx, dscps, i, dscpcount);
grow_array(mctx, keys, i, keycount);
grow_array(mctx, tlss, i, tlscount);
addrs[i] = *cfg_obj_assockaddr(addr);
dscps[i] = cfg_obj_getdscp(addr);
if (dscps[i] == -1) {
dscps[i] = dscp;
}
result = named_config_getname(mctx, key, &keys[i]);
if (result != ISC_R_SUCCESS) {
@ -907,12 +844,10 @@ resume:
pushed--;
element = stack[pushed].element;
port = stack[pushed].port;
dscp = stack[pushed].dscp;
goto resume;
}
shrink_array(mctx, addrs, i, addrcount);
shrink_array(mctx, dscps, i, dscpcount);
shrink_array(mctx, keys, i, keycount);
shrink_array(mctx, tlss, i, tlscount);
@ -923,13 +858,10 @@ resume:
isc_mem_put(mctx, stack, stackcount * sizeof(stack[0]));
}
INSIST(dscpcount == addrcount);
INSIST(keycount == addrcount);
INSIST(tlscount == addrcount);
INSIST(keycount == dscpcount);
ipkl->addrs = addrs;
ipkl->dscps = dscps;
ipkl->keys = keys;
ipkl->tlss = tlss;
ipkl->count = addrcount;
@ -941,9 +873,6 @@ cleanup:
if (addrs != NULL) {
isc_mem_put(mctx, addrs, addrcount * sizeof(addrs[0]));
}
if (dscps != NULL) {
isc_mem_put(mctx, dscps, dscpcount * sizeof(dscps[0]));
}
if (keys != NULL) {
for (j = 0; j < i; j++) {
if (keys[j] == NULL) {
@ -1006,32 +935,6 @@ named_config_getport(const cfg_obj_t *config, const char *type,
return (ISC_R_SUCCESS);
}
isc_result_t
named_config_getdscp(const cfg_obj_t *config, isc_dscp_t *dscpp) {
const cfg_obj_t *options = NULL;
const cfg_obj_t *dscpobj = NULL;
isc_result_t result;
(void)cfg_map_get(config, "options", &options);
if (options == NULL) {
return (ISC_R_SUCCESS);
}
result = cfg_map_get(options, "dscp", &dscpobj);
if (result != ISC_R_SUCCESS || dscpobj == NULL) {
*dscpp = -1;
return (ISC_R_SUCCESS);
}
if (cfg_obj_asuint32(dscpobj) >= 64) {
cfg_obj_log(dscpobj, named_g_lctx, ISC_LOG_ERROR,
"dscp '%u' out of range",
cfg_obj_asuint32(dscpobj));
return (ISC_R_RANGE);
}
*dscpp = (isc_dscp_t)cfg_obj_asuint32(dscpobj);
return (ISC_R_SUCCESS);
}
struct keyalgorithms {
const char *str;
enum {

View File

@ -55,12 +55,11 @@ named_config_getzonetype(const cfg_obj_t *zonetypeobj);
isc_result_t
named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
in_port_t defport, isc_mem_t *mctx,
isc_sockaddr_t **addrsp, isc_dscp_t **dscpsp,
uint32_t *countp);
isc_sockaddr_t **addrsp, uint32_t *countp);
void
named_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
isc_dscp_t **dscpsp, uint32_t count);
uint32_t count);
isc_result_t
named_config_getremotesdef(const cfg_obj_t *cctx, const char *list,
@ -81,6 +80,3 @@ named_config_getkeyalgorithm(const char *str, const dns_name_t **name,
isc_result_t
named_config_getkeyalgorithm2(const char *str, const dns_name_t **name,
unsigned int *typep, uint16_t *digestbits);
isc_result_t
named_config_getdscp(const cfg_obj_t *config, isc_dscp_t *dscpp);

View File

@ -75,7 +75,6 @@ EXTERN in_port_t named_g_port INIT(0);
EXTERN in_port_t named_g_tlsport INIT(0);
EXTERN in_port_t named_g_httpsport INIT(0);
EXTERN in_port_t named_g_httpport INIT(0);
EXTERN isc_dscp_t named_g_dscp INIT(-1);
EXTERN in_port_t named_g_http_listener_clients INIT(0);
EXTERN in_port_t named_g_http_streams_per_conn INIT(0);

View File

@ -110,7 +110,6 @@
#define BACKTRACE_MAXFRAME 128
#endif /* ifndef BACKTRACE_MAXFRAME */
extern int isc_dscp_check_value;
extern unsigned int dns_zone_mkey_hour;
extern unsigned int dns_zone_mkey_day;
extern unsigned int dns_zone_mkey_month;
@ -716,13 +715,9 @@ parse_T_opt(char *option) {
/*
* force the server to behave (or misbehave) in
* specified ways for testing purposes.
* dscp=x: check that dscp values are as
* expected and assert otherwise.
*/
if (!strcmp(option, "dropedns")) {
dropedns = true;
} else if (!strncmp(option, "dscp=", 5)) {
isc_dscp_check_value = atoi(option + 5);
} else if (!strcmp(option, "ednsformerr")) {
ednsformerr = true;
} else if (!strcmp(option, "ednsnotimp")) {

View File

@ -1264,13 +1264,11 @@ cleanup:
*/
static isc_result_t
get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
dns_dispatch_t **dispatchp, isc_dscp_t *dscpp,
bool is_firstview) {
dns_dispatch_t **dispatchp, bool is_firstview) {
isc_result_t result = ISC_R_FAILURE;
dns_dispatch_t *disp = NULL;
isc_sockaddr_t sa;
const cfg_obj_t *obj = NULL;
isc_dscp_t dscp = -1;
switch (af) {
case AF_INET:
@ -1288,11 +1286,6 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
sa = *(cfg_obj_assockaddr(obj));
INSIST(isc_sockaddr_pf(&sa) == af);
dscp = cfg_obj_getdscp(obj);
if (dscp != -1 && dscpp != NULL) {
*dscpp = dscp;
}
/*
* If we don't support this address family, we're done!
*/
@ -1589,10 +1582,6 @@ configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
result = dns_peer_settransferdscp(peer, cfg_obj_getdscp(obj));
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
named_add_reserved_dispatch(named_g_server,
cfg_obj_assockaddr(obj));
}
@ -1609,10 +1598,6 @@ configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
result = dns_peer_setnotifydscp(peer, cfg_obj_getdscp(obj));
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
named_add_reserved_dispatch(named_g_server,
cfg_obj_assockaddr(obj));
}
@ -1628,10 +1613,6 @@ configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
result = dns_peer_setquerydscp(peer, cfg_obj_getdscp(obj));
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
named_add_reserved_dispatch(named_g_server,
cfg_obj_assockaddr(obj));
}
@ -4130,7 +4111,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
dns_acl_t *clients = NULL, *mapped = NULL, *excluded = NULL;
unsigned int query_timeout, ndisp;
bool old_rpz_ok = false;
isc_dscp_t dscp4 = -1, dscp6 = -1;
dns_dyndbctx_t *dctx = NULL;
unsigned int resolver_param;
dns_ntatable_t *ntatable = NULL;
@ -4776,10 +4756,10 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
* Resolver.
*/
CHECK(get_view_querysource_dispatch(
maps, AF_INET, &dispatch4, &dscp4,
maps, AF_INET, &dispatch4,
(ISC_LIST_PREV(view, link) == NULL)));
CHECK(get_view_querysource_dispatch(
maps, AF_INET6, &dispatch6, &dscp6,
maps, AF_INET6, &dispatch6,
(ISC_LIST_PREV(view, link) == NULL)));
if (dispatch4 == NULL && dispatch6 == NULL) {
UNEXPECTED_ERROR("unable to obtain either an IPv4 or"
@ -4804,19 +4784,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
ndisp, named_g_netmgr, named_g_timermgr, resopts,
named_g_dispatchmgr, dispatch4, dispatch6));
if (dscp4 == -1) {
dscp4 = named_g_dscp;
}
if (dscp6 == -1) {
dscp6 = named_g_dscp;
}
if (dscp4 != -1) {
dns_resolver_setquerydscp4(view->resolver, dscp4);
}
if (dscp6 != -1) {
dns_resolver_setquerydscp6(view->resolver, dscp6);
}
/*
* Set the ADB cache size to 1/8th of the max-cache-size or
* MAX_ADB_SIZE_FOR_CACHESHARE when the cache is shared.
@ -6270,15 +6237,14 @@ static isc_result_t
configure_forward(const cfg_obj_t *config, dns_view_t *view,
const dns_name_t *origin, const cfg_obj_t *forwarders,
const cfg_obj_t *forwardtype) {
const cfg_obj_t *portobj, *dscpobj;
const cfg_obj_t *faddresses;
const cfg_listelt_t *element;
const cfg_obj_t *portobj = NULL;
const cfg_obj_t *faddresses = NULL;
const cfg_listelt_t *element = NULL;
dns_fwdpolicy_t fwdpolicy = dns_fwdpolicy_none;
dns_forwarderlist_t fwdlist;
dns_forwarder_t *fwd;
dns_forwarder_t *fwd = NULL;
isc_result_t result;
in_port_t port;
isc_dscp_t dscp = -1;
ISC_LIST_INIT(fwdlist);
@ -6301,24 +6267,6 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view,
}
}
/*
* DSCP value for forwarded requests.
*/
dscp = named_g_dscp;
if (forwarders != NULL) {
dscpobj = cfg_tuple_get(forwarders, "dscp");
if (cfg_obj_isuint32(dscpobj)) {
if (cfg_obj_asuint32(dscpobj) > 63) {
cfg_obj_log(dscpobj, named_g_lctx,
ISC_LOG_ERROR,
"dscp value '%u' is out of range",
cfg_obj_asuint32(dscpobj));
return (ISC_R_RANGE);
}
dscp = (isc_dscp_t)cfg_obj_asuint32(dscpobj);
}
}
faddresses = NULL;
if (forwarders != NULL) {
faddresses = cfg_tuple_get(forwarders, "addresses");
@ -6333,10 +6281,6 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view,
if (isc_sockaddr_getport(&fwd->addr) == 0) {
isc_sockaddr_setport(&fwd->addr, port);
}
fwd->dscp = cfg_obj_getdscp(forwarder);
if (fwd->dscp == -1) {
fwd->dscp = dscp;
}
ISC_LINK_INIT(fwd, link);
ISC_LIST_APPEND(fwdlist, fwd, link);
}
@ -9035,11 +8979,6 @@ load_configuration(const char *filename, named_server_t *server,
"port");
}
/*
* Determining the default DSCP code point.
*/
CHECKM(named_config_getdscp(config, &named_g_dscp), "dscp");
/*
* Find the listen queue depth.
*/
@ -9099,8 +9038,7 @@ load_configuration(const char *filename, named_server_t *server,
* Not specified, use default.
*/
CHECK(ns_listenlist_default(named_g_mctx, listen_port,
-1, true, AF_INET,
&listenon));
true, AF_INET, &listenon));
}
if (listenon != NULL) {
ns_interfacemgr_setlistenon4(server->interfacemgr,
@ -9128,8 +9066,7 @@ load_configuration(const char *filename, named_server_t *server,
* Not specified, use default.
*/
CHECK(ns_listenlist_default(named_g_mctx, listen_port,
-1, true, AF_INET6,
&listenon));
true, AF_INET6, &listenon));
}
if (listenon != NULL) {
ns_interfacemgr_setlistenon6(server->interfacemgr,
@ -11126,10 +11063,9 @@ listenelt_fromconfig(const cfg_obj_t *listener, const cfg_obj_t *config,
isc_result_t result;
const cfg_obj_t *ltup = NULL;
const cfg_obj_t *tlsobj = NULL, *httpobj = NULL;
const cfg_obj_t *portobj = NULL, *dscpobj = NULL;
const cfg_obj_t *portobj = NULL;
const cfg_obj_t *http_server = NULL;
in_port_t port = 0;
isc_dscp_t dscp = -1;
const char *key = NULL, *cert = NULL, *ca_file = NULL,
*dhparam_file = NULL, *ciphers = NULL;
bool tls_prefer_server_ciphers = false,
@ -11323,16 +11259,6 @@ listenelt_fromconfig(const cfg_obj_t *listener, const cfg_obj_t *config,
port = (in_port_t)cfg_obj_asuint32(portobj);
}
dscpobj = cfg_tuple_get(ltup, "dscp");
if (!cfg_obj_isuint32(dscpobj)) {
dscp = named_g_dscp;
} else {
if (cfg_obj_asuint32(dscpobj) > 63) {
return (ISC_R_RANGE);
}
dscp = (isc_dscp_t)cfg_obj_asuint32(dscpobj);
}
#ifdef HAVE_LIBNGHTTP2
if (http) {
CHECK(listenelt_http(http_server, family, do_tls, &tls_params,
@ -11341,9 +11267,8 @@ listenelt_fromconfig(const cfg_obj_t *listener, const cfg_obj_t *config,
#endif /* HAVE_LIBNGHTTP2 */
if (!http) {
CHECK(ns_listenelt_create(mctx, port, dscp, NULL, family,
do_tls, &tls_params, tlsctx_cache,
&delt));
CHECK(ns_listenelt_create(mctx, port, NULL, family, do_tls,
&tls_params, tlsctx_cache, &delt));
}
result = cfg_acl_fromconfig2(cfg_tuple_get(listener, "acl"), config,
@ -11429,9 +11354,9 @@ listenelt_http(const cfg_obj_t *http, const uint16_t family, bool tls,
INSIST(i == len);
result = ns_listenelt_create_http(
mctx, port, named_g_dscp, NULL, family, tls, tls_params,
tlsctx_cache, endpoints, len, max_clients, max_streams, &delt);
result = ns_listenelt_create_http(mctx, port, NULL, family, tls,
tls_params, tlsctx_cache, endpoints,
len, max_clients, max_streams, &delt);
if (result != ISC_R_SUCCESS) {
goto error;
}

View File

@ -912,7 +912,6 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
int seconds;
dns_ttl_t maxttl = 0; /* unlimited */
dns_zone_t *mayberaw = (raw != NULL) ? raw : zone;
isc_dscp_t dscp;
i = 0;
if (zconfig != NULL) {
@ -1273,23 +1272,17 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
RETERR(named_config_getipandkeylist(config, "primaries",
obj, mctx, &ipkl));
dns_zone_setalsonotify(zone, ipkl.addrs, ipkl.dscps,
ipkl.keys, ipkl.tlss,
ipkl.count);
dns_zone_setalsonotify(zone, ipkl.addrs, ipkl.keys,
ipkl.tlss, ipkl.count);
dns_ipkeylist_clear(mctx, &ipkl);
} else {
dns_zone_setalsonotify(zone, NULL, NULL, NULL, NULL, 0);
dns_zone_setalsonotify(zone, NULL, NULL, NULL, 0);
}
obj = NULL;
result = named_config_get(maps, "parental-source", &obj);
INSIST(result == ISC_R_SUCCESS && obj != NULL);
RETERR(dns_zone_setparentalsrc4(zone, cfg_obj_assockaddr(obj)));
dscp = cfg_obj_getdscp(obj);
if (dscp == -1) {
dscp = named_g_dscp;
}
RETERR(dns_zone_setparentalsrc4dscp(zone, dscp));
named_add_reserved_dispatch(named_g_server,
cfg_obj_assockaddr(obj));
@ -1297,11 +1290,6 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
result = named_config_get(maps, "parental-source-v6", &obj);
INSIST(result == ISC_R_SUCCESS && obj != NULL);
RETERR(dns_zone_setparentalsrc6(zone, cfg_obj_assockaddr(obj)));
dscp = cfg_obj_getdscp(obj);
if (dscp == -1) {
dscp = named_g_dscp;
}
RETERR(dns_zone_setparentalsrc6dscp(zone, dscp));
named_add_reserved_dispatch(named_g_server,
cfg_obj_assockaddr(obj));
@ -1309,11 +1297,6 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
result = named_config_get(maps, "notify-source", &obj);
INSIST(result == ISC_R_SUCCESS && obj != NULL);
RETERR(dns_zone_setnotifysrc4(zone, cfg_obj_assockaddr(obj)));
dscp = cfg_obj_getdscp(obj);
if (dscp == -1) {
dscp = named_g_dscp;
}
RETERR(dns_zone_setnotifysrc4dscp(zone, dscp));
named_add_reserved_dispatch(named_g_server,
cfg_obj_assockaddr(obj));
@ -1321,11 +1304,6 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
result = named_config_get(maps, "notify-source-v6", &obj);
INSIST(result == ISC_R_SUCCESS && obj != NULL);
RETERR(dns_zone_setnotifysrc6(zone, cfg_obj_assockaddr(obj)));
dscp = cfg_obj_getdscp(obj);
if (dscp == -1) {
dscp = named_g_dscp;
}
RETERR(dns_zone_setnotifysrc6dscp(zone, dscp));
named_add_reserved_dispatch(named_g_server,
cfg_obj_assockaddr(obj));
@ -1950,11 +1928,6 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
INSIST(result == ISC_R_SUCCESS && obj != NULL);
RETERR(dns_zone_setxfrsource4(mayberaw,
cfg_obj_assockaddr(obj)));
dscp = cfg_obj_getdscp(obj);
if (dscp == -1) {
dscp = named_g_dscp;
}
RETERR(dns_zone_setxfrsource4dscp(mayberaw, dscp));
named_add_reserved_dispatch(named_g_server,
cfg_obj_assockaddr(obj));
@ -1963,11 +1936,6 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
INSIST(result == ISC_R_SUCCESS && obj != NULL);
RETERR(dns_zone_setxfrsource6(mayberaw,
cfg_obj_assockaddr(obj)));
dscp = cfg_obj_getdscp(obj);
if (dscp == -1) {
dscp = named_g_dscp;
}
RETERR(dns_zone_setxfrsource6dscp(mayberaw, dscp));
named_add_reserved_dispatch(named_g_server,
cfg_obj_assockaddr(obj));
@ -1976,23 +1944,11 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
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) {

View File

@ -2504,7 +2504,7 @@ send_update(dns_name_t *zone, isc_sockaddr_t *primary) {
updatemsg->tsigname->attributes |= DNS_NAMEATTR_NOCOMPRESS;
}
result = dns_request_create(requestmgr, updatemsg, srcaddr, primary, -1,
result = dns_request_create(requestmgr, updatemsg, srcaddr, primary,
options, tsigkey, timeout, udp_timeout,
udp_retries, global_task, update_completed,
NULL, &request);
@ -2614,7 +2614,7 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
}
result = dns_request_create(requestmgr, soaquery, srcaddr, addr,
-1, 0, NULL, FIND_TIMEOUT * 20,
0, NULL, FIND_TIMEOUT * 20,
FIND_TIMEOUT, 3, global_task,
recvsoa, reqinfo, &request);
check_result(result, "dns_request_create");
@ -2833,7 +2833,7 @@ sendrequest(isc_sockaddr_t *destaddr, dns_message_t *msg,
srcaddr = localaddr4;
}
result = dns_request_create(requestmgr, msg, srcaddr, destaddr, -1, 0,
result = dns_request_create(requestmgr, msg, srcaddr, destaddr, 0,
default_servers ? NULL : tsigkey,
FIND_TIMEOUT * 20, FIND_TIMEOUT, 3,
global_task, recvsoa, reqinfo, request);
@ -3035,10 +3035,9 @@ send_gssrequest(isc_sockaddr_t *destaddr, dns_message_t *msg,
srcaddr = localaddr4;
}
result = dns_request_create(requestmgr, msg, srcaddr, destaddr, -1,
options, tsigkey, FIND_TIMEOUT * 20,
FIND_TIMEOUT, 3, global_task, recvgss,
reqinfo, request);
result = dns_request_create(requestmgr, msg, srcaddr, destaddr, options,
tsigkey, FIND_TIMEOUT * 20, FIND_TIMEOUT, 3,
global_task, recvgss, reqinfo, request);
check_result(result, "dns_request_create");
if (debugging) {
show_message(stdout, msg, "Outgoing update query:");

View File

@ -108,7 +108,6 @@ TESTS += \
dialup \
dlzexternal \
dns64 \
dscp \
dsdigest \
dupsigs \
dyndb \

View File

@ -13,13 +13,4 @@
options {
port 999999;
dscp 222;
listen-on port 100 dscp 444 {
127.0.0.1/32;
};
};
zone "example" {
type primary;
file "example.db";
};

View File

@ -68,7 +68,6 @@ database
digdelv
dlz
dns64
dscp
dsdigest
ecdsa
eddsa

View File

@ -30,9 +30,9 @@ controls {
};
options {
query-source address 10.53.0.1 dscp 1;
notify-source 10.53.0.1 dscp 2;
transfer-source 10.53.0.1 dscp 3;
query-source address 10.53.0.1;
notify-source 10.53.0.1;
transfer-source 10.53.0.1;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.1; };

View File

@ -12,9 +12,9 @@
*/
options {
query-source address 10.53.0.2 dscp 1;
notify-source 10.53.0.2 dscp 2;
transfer-source 10.53.0.2 dscp 3;
query-source address 10.53.0.2;
notify-source 10.53.0.2;
transfer-source 10.53.0.2;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.2; };

View File

@ -21,9 +21,9 @@ controls {
};
options {
query-source address 10.53.0.3 dscp 1;
notify-source 10.53.0.3 dscp 2;
transfer-source 10.53.0.3 dscp 3;
query-source address 10.53.0.3;
notify-source 10.53.0.3;
transfer-source 10.53.0.3;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.3; };

View File

@ -12,9 +12,9 @@
*/
options {
query-source address 10.53.0.7 dscp 1;
notify-source 10.53.0.7 dscp 2;
transfer-source 10.53.0.7 dscp 3;
query-source address 10.53.0.7;
notify-source 10.53.0.7;
transfer-source 10.53.0.7;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.7; };

View File

@ -12,7 +12,7 @@
*/
options {
query-source address 10.53.0.3 dscp 1;
query-source address 10.53.0.3;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.3; };

View File

@ -542,17 +542,6 @@ if [ -x "$DIG" ] ; then
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "checking dig +dscp ($n)"
ret=0
dig_with_opts @10.53.0.3 +dscp=32 a a.example > /dev/null 2>&1 || ret=1
dig_with_opts @10.53.0.3 +dscp=-1 a a.example > /dev/null 2>&1 && ret=1
dig_with_opts @10.53.0.3 +dscp=64 a a.example > /dev/null 2>&1 && ret=1
#TODO add a check to make sure dig is actually setting the dscp on the query
#we might have to add better logging to named for this
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "checking dig +ednsopt with option number ($n)"
ret=0

View File

@ -14,9 +14,9 @@
// NS4
options {
query-source address 10.53.0.4 dscp 1;
notify-source 10.53.0.4 dscp 2;
transfer-source 10.53.0.4 dscp 3;
query-source address 10.53.0.4;
notify-source 10.53.0.4;
transfer-source 10.53.0.4;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.4; };

View File

@ -14,10 +14,9 @@
// NS4
options {
query-source address 10.53.0.4 dscp 4;
notify-source 10.53.0.4 dscp 5;
transfer-source 10.53.0.4 dscp 6;
dscp 16;
query-source address 10.53.0.4;
notify-source 10.53.0.4;
transfer-source 10.53.0.4;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.4; };

View File

@ -1,20 +0,0 @@
#!/bin/sh
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
rm -f */root.bk
rm -f dig.out.10.53.0.?
rm -f */named.memstats
rm -f */named.run
rm -f */named.conf
rm -f ns*/named.lock
rm -f ns*/managed-keys.bind*

View File

@ -1 +0,0 @@
-m record -c named.conf -d 99 -D dscp-ns1 -X named.lock -g -U 4 -T maxcachesize=2097152 -T dscp=46

View File

@ -1,31 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
dscp 46;
query-source address 10.53.0.1;
notify-source 10.53.0.1;
transfer-source 10.53.0.1;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.1; };
listen-on-v6 { none; };
recursion no;
dnssec-validation no;
notify yes;
};
zone "." {
type primary;
file "root.db";
};

View File

@ -1,19 +0,0 @@
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
;
; SPDX-License-Identifier: MPL-2.0
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, you can obtain one at https://mozilla.org/MPL/2.0/.
;
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
$TTL 3600
. SOA ns1.nil-servers. marka.isc.org. 1 3600 1200 3600000 1200
. NS ns1.nil-servers.
. NS ns2.nil-servers.
ns1.nil-servers. A 10.53.0.1
ns2.nil-servers. A 10.53.0.2
xxx.example. A 10.53.0.1
xxx.tld. A 10.53.0.1

View File

@ -1 +0,0 @@
-m record -c named.conf -d 99 -D dscp-ns2 -X named.lock -g -U 4 -T maxcachesize=2097152 -T dscp=46

View File

@ -1,32 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
dscp 46;
query-source address 10.53.0.2;
notify-source 10.53.0.2;
transfer-source 10.53.0.2;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.2; };
listen-on-v6 { none; };
recursion no;
dnssec-validation no;
notify yes;
};
zone "." {
type secondary;
file "root.bk";
primaries { 10.53.0.1; };
};

View File

@ -1,16 +0,0 @@
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
;
; SPDX-License-Identifier: MPL-2.0
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, you can obtain one at https://mozilla.org/MPL/2.0/.
;
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
$TTL 3600
. NS ns1.nil-servers.
. NS ns2.nil-servers.
ns1.nil-servers. A 10.53.0.1
ns2.nil-servers. A 10.53.0.2

View File

@ -1 +0,0 @@
-m record -c named.conf -d 99 -D dscp-ns3 -X named.lock -g -U 4 -T maxcachesize=2097152 -T dscp=46

View File

@ -1,31 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
dscp 46;
query-source address 10.53.0.3;
notify-source 10.53.0.3;
transfer-source 10.53.0.3;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.3; };
listen-on-v6 { none; };
notify yes;
recursion yes;
dnssec-validation yes;
};
zone "." {
type hint;
file "hint.db";
};

View File

@ -1 +0,0 @@
-m record -c named.conf -d 99 -D dscp-ns4 -X named.lock -g -U 4 -T maxcachesize=2097152 -T dscp=46

View File

@ -1,31 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
dscp 47;
query-source dscp 46 address 10.53.0.4;
notify-source 10.53.0.4 dscp 46;
transfer-source 10.53.0.4 dscp 46;
port @PORT@;
pid-file "named.pid";
listen-on dscp 46 { 10.53.0.4; };
listen-on-v6 { none; };
recursion no;
dnssec-validation no;
notify yes;
};
zone "." {
type primary;
file "root.db";
};

View File

@ -1,19 +0,0 @@
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
;
; SPDX-License-Identifier: MPL-2.0
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, you can obtain one at https://mozilla.org/MPL/2.0/.
;
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
$TTL 3600
. SOA ns4.nil-servers. marka.isc.org. 1 3600 1200 3600000 1200
. NS ns4.nil-servers.
. NS ns5.nil-servers.
ns4.nil-servers. A 10.53.0.4
ns5.nil-servers. A 10.53.0.5
xxx.example. A 10.53.0.1
xxx.tld. A 10.53.0.1

View File

@ -1 +0,0 @@
-m record -c named.conf -d 99 -D dscp-ns5 -X named.lock -g -U 4 -T maxcachesize=2097152 -T dscp=46

View File

@ -1,33 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
dscp 47;
query-source dscp 46 address 10.53.0.5;
notify-source 10.53.0.5 dscp 46;
transfer-source 10.53.0.5 dscp 46;
alt-transfer-source 10.53.0.5 dscp 46;
port @PORT@;
pid-file "named.pid";
listen-on dscp 46 { 10.53.0.5; };
listen-on-v6 { none; };
recursion no;
dnssec-validation no;
notify yes;
};
zone "." {
type secondary;
file "root.bk";
primaries { 10.53.0.4; };
};

View File

@ -1,16 +0,0 @@
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
;
; SPDX-License-Identifier: MPL-2.0
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, you can obtain one at https://mozilla.org/MPL/2.0/.
;
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
$TTL 3600
. NS ns4.nil-servers.
. NS ns5.nil-servers.
ns4.nil-servers. A 10.53.0.4
ns5.nil-servers. A 10.53.0.5

View File

@ -1 +0,0 @@
-m record -c named.conf -d 99 -D dscp-ns6 -X named.lock -g -U 4 -T maxcachesize=2097152 -T dscp=46

View File

@ -1,31 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
dscp 47;
query-source dscp 46 address 10.53.0.6;
notify-source 10.53.0.6 dscp 46;
transfer-source 10.53.0.6 dscp 46;
port @PORT@;
pid-file "named.pid";
listen-on dscp 46 { 10.53.0.6; };
listen-on-v6 { none; };
notify yes;
recursion yes;
dnssec-validation yes;
};
zone "." {
type hint;
file "hint.db";
};

View File

@ -1 +0,0 @@
-m record -c named.conf -d 99 -D dscp-ns7 -X named.lock -g -U 4 -T maxcachesize=2097152 -T dscp=46

View File

@ -1,36 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
dscp 47;
query-source dscp 46 address 10.53.0.7;
notify-source 10.53.0.7 dscp 47;
transfer-source 10.53.0.7 dscp 47;
alt-transfer-source 10.53.0.7 dscp 47;
port @PORT@;
pid-file "named.pid";
listen-on dscp 46 { 10.53.0.7; };
listen-on-v6 { none; };
recursion no;
dnssec-validation no;
notify yes;
};
zone "." {
type secondary;
file "root.bk";
transfer-source 10.53.0.7 dscp 46;
notify-source 10.53.0.7 dscp 46;
alt-transfer-source 10.53.0.7 dscp 46;
primaries { 10.53.0.4; };
};

View File

@ -1,22 +0,0 @@
#!/bin/sh
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
. ../conf.sh
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
copy_setports ns3/named.conf.in ns3/named.conf
copy_setports ns4/named.conf.in ns4/named.conf
copy_setports ns5/named.conf.in ns5/named.conf
copy_setports ns6/named.conf.in ns6/named.conf
copy_setports ns7/named.conf.in ns7/named.conf

View File

@ -1,41 +0,0 @@
#!/bin/sh
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
. ../conf.sh
DIGOPTS="+tcp +noadd +nosea +nostat +noquest -p ${PORT}"
status=0
#
# 10.53.0.1 10.53.0.2 10.53.0.3 have a global dscp setting;
# 10.53.0.4 10.53.0.5 10.53.0.6 have dscp set in option *-source clauses;
# 10.53.0.7 has dscp set in zone *-source clauses;
#
for server in 10.53.0.1 10.53.0.2 10.53.0.3 10.53.0.4 10.53.0.5 \
10.53.0.6 10.53.0.7
do
echo_i "testing root SOA lookup at $server"
for i in 0 1 2 3 4 5 6 7 8 9
do
ret=0
$DIG $DIGOPTS @$server soa . > dig.out.$server
grep "status: NOERROR" dig.out.$server > /dev/null || ret=1
test $ret = 0 && break
sleep 1
done
test $ret = 0 || { echo_i "failed"; status=`expr $status + $ret`; }
done
echo_i "exit status: $status"
[ $status -eq 0 ] || exit 1

View File

@ -21,9 +21,9 @@ controls {
};
options {
query-source address 10.53.0.1 dscp 1;
notify-source 10.53.0.1 dscp 2;
transfer-source 10.53.0.1 dscp 3;
query-source address 10.53.0.1;
notify-source 10.53.0.1;
transfer-source 10.53.0.1;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.1; };

View File

@ -21,9 +21,9 @@ controls {
};
options {
query-source address 10.53.0.1 dscp 1;
notify-source 10.53.0.1 dscp 2;
transfer-source 10.53.0.1 dscp 3;
query-source address 10.53.0.1;
notify-source 10.53.0.1;
transfer-source 10.53.0.1;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.1; };

View File

@ -12,9 +12,9 @@
*/
options {
query-source address 10.53.0.1 dscp 1;
notify-source 10.53.0.1 dscp 22;
transfer-source 10.53.0.1 dscp 3;
query-source address 10.53.0.1;
notify-source 10.53.0.1;
transfer-source 10.53.0.1;
port @PORT@;
pid-file "named.pid";
session-keyfile "session.key";

View File

@ -12,9 +12,9 @@
*/
options {
query-source address 10.53.0.2 dscp 4;
notify-source 10.53.0.2 dscp 5;
transfer-source 10.53.0.2 dscp 6;
query-source address 10.53.0.2;
notify-source 10.53.0.2;
transfer-source 10.53.0.2;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.2; };

View File

@ -14,9 +14,9 @@
// NS3
options {
query-source address 10.53.0.3 dscp 7;
notify-source 10.53.0.3 dscp 8;
transfer-source 10.53.0.3 dscp 9;
query-source address 10.53.0.3;
notify-source 10.53.0.3;
transfer-source 10.53.0.3;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.3; };

View File

@ -170,7 +170,7 @@ sendquery(isc_task_t *task) {
dns_message_addname(message, qname, DNS_SECTION_QUESTION);
result = dns_request_create(requestmgr, message,
have_src ? &srcaddr : NULL, &dstaddr, -1,
have_src ? &srcaddr : NULL, &dstaddr,
DNS_REQUESTOPT_TCP, NULL, TIMEOUT, 0, 0,
task, recvresponse, message, &request);
CHECK("dns_request_create", result);

View File

@ -12,9 +12,9 @@
*/
options {
query-source address 10.53.0.1 dscp 1;
notify-source 10.53.0.1 dscp 2;
transfer-source 10.53.0.1 dscp 3;
query-source address 10.53.0.1;
notify-source 10.53.0.1;
transfer-source 10.53.0.1;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.1; };

View File

@ -14,9 +14,9 @@
// NS4
options {
query-source address 10.53.0.4 dscp 4;
notify-source 10.53.0.4 dscp 5;
transfer-source 10.53.0.4 dscp 6;
query-source address 10.53.0.4;
notify-source 10.53.0.4;
transfer-source 10.53.0.4;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.4; };

View File

@ -14,9 +14,9 @@
// NS5
options {
query-source address 10.53.0.5 dscp 7;
notify-source 10.53.0.5 dscp 8;
transfer-source 10.53.0.5 dscp 9;
query-source address 10.53.0.5;
notify-source 10.53.0.5;
transfer-source 10.53.0.5;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.5; };

View File

@ -14,9 +14,9 @@
// NS6
options {
query-source address 10.53.0.6 dscp 10;
notify-source 10.53.0.6 dscp 11;
transfer-source 10.53.0.6 dscp 12;
query-source address 10.53.0.6;
notify-source 10.53.0.6;
transfer-source 10.53.0.6;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.6; };

View File

@ -14,9 +14,9 @@
// NS7
options {
query-source address 10.53.0.7 dscp 13;
notify-source 10.53.0.7 dscp 14;
transfer-source 10.53.0.7 dscp 15;
query-source address 10.53.0.7;
notify-source 10.53.0.7;
transfer-source 10.53.0.7;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.7; };

View File

@ -14,9 +14,9 @@
// NS7
options {
query-source address 10.53.0.7 dscp 13;
notify-source 10.53.0.7 dscp 14;
transfer-source 10.53.0.7 dscp 15;
query-source address 10.53.0.7;
notify-source 10.53.0.7;
transfer-source 10.53.0.7;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.7; };

View File

@ -178,7 +178,7 @@ sendquery(isc_task_t *task, isc_event_t *event) {
DNS_TSIG_HMACMD5_NAME, &nonce, 3600);
CHECK("dns_tkey_builddhquery", result);
result = dns_request_create(requestmgr, query, NULL, &address, -1,
result = dns_request_create(requestmgr, query, NULL, &address,
DNS_REQUESTOPT_TCP, initialkey, TIMEOUT, 0,
0, task, recvquery, query, &request);
CHECK("dns_request_create", result);

View File

@ -122,7 +122,7 @@ sendquery(isc_task_t *task, isc_event_t *event) {
result = dns_tkey_builddeletequery(query, tsigkey);
CHECK("dns_tkey_builddeletequery", result);
result = dns_request_create(requestmgr, query, NULL, &address, -1,
result = dns_request_create(requestmgr, query, NULL, &address,
DNS_REQUESTOPT_TCP, tsigkey, TIMEOUT, 0, 0,
task, recvquery, query, &request);
CHECK("dns_request_create", result);

View File

@ -116,7 +116,6 @@ static isc_sockaddr_t srcaddr;
static char *server = NULL;
static isc_sockaddr_t dstaddr;
static in_port_t port = 53;
static isc_dscp_t dscp = -1;
static unsigned char cookie_secret[33];
static int onfly = 0;
static char hexcookie[81];
@ -755,7 +754,7 @@ sendquery(struct query *query, isc_task_t *task) {
request = NULL;
result = dns_request_create(
requestmgr, message, have_src ? &srcaddr : NULL, &dstaddr, dscp,
requestmgr, message, have_src ? &srcaddr : NULL, &dstaddr,
options, NULL, query->timeout, query->udptimeout,
query->udpretries, task, recvresponse, message, &request);
CHECK("dns_request_create", result);
@ -814,9 +813,6 @@ help(void) {
" -p port (specify port number)\n"
" -m (enable memory usage "
"debugging)\n"
" +[no]dscp[=###] (Set the DSCP value to "
"### "
"[0..63])\n"
" +[no]vc (TCP mode)\n"
" +[no]tcp (TCP mode, alternate "
"syntax)\n"
@ -1321,18 +1317,10 @@ plus_option(char *option, struct query *query, bool global) {
query->dnssec = state;
break;
case 's': /* dscp */
/* obsolete */
FULLCHECK("dscp");
GLOBAL();
if (!state) {
dscp = -1;
break;
}
if (value == NULL) {
goto need_value;
}
result = parse_uint(&num, value, 0x3f, "DSCP");
CHECK("parse_uint(DSCP)", result);
dscp = num;
fprintf(stderr, ";; +dscp option is obsolete "
"and has no effect");
break;
default:
goto invalid_option;

View File

@ -161,11 +161,10 @@ The global query options are:
they are replaced by the string "[omitted]"; in the DNSKEY case, the
key ID is displayed as the replacement, e.g., ``[ key id = value ]``.
.. option:: +dscp[=value]
.. option:: +dscp=value
This option sets the DSCP code point to be used when sending the query. Valid DSCP
code points are in the range [0...63]. By default no code point is
explicitly set.
This option formerly set the DSCP value used when sending a query.
It is now obsolete, and has no effect.
.. option:: +multiline, +nomultiline

View File

@ -314,9 +314,6 @@ file documentation:
``domain_name``
A quoted string which is used as a DNS name; for example: ``my.test.domain``.
``dscp``
An :term:`integer` between 0 and 63, used to select a Differentiated Services Code Point (DSCP) value for use with outgoing traffic on operating systems that support DSCP.
``fixedpoint``
A non-negative real number that can be specified to the nearest one-hundredth. Up to five digits can be specified before a decimal point, and up to two digits after, so the maximum value is 99999.99. Acceptable values might be further limited by the contexts in which they are used.
@ -1611,11 +1608,11 @@ default is used.
.. namedconf:statement:: dscp
:tags: server, query
:short: Specifies the global Differentiated Services Code Point (DSCP) value to classify outgoing DNS traffic.
:short: Sets the Differentiated Services Code Point (DSCP) value (obsolete).
This is the global Differentiated Services Code Point (DSCP) value to
classify outgoing DNS traffic, on operating systems that support DSCP.
Valid values are 0 through 63. It is not configured by default.
This option used to set the global Differentiated Services Code Point
(DSCP) value to classify outgoing DNS traffic. It is now obsolete and
has no effect.
.. namedconf:statement:: preferred-glue
:tags: query
@ -2890,8 +2887,8 @@ authoritative and does not have the answer in its cache.
This specifies a list of IP addresses to which queries are forwarded. The
default is the empty list (no forwarding). Each address in the list can be
associated with an optional port number and/or DSCP value, and a default port
number and DSCP value can be set for the entire list.
associated with an optional port number. A default port number can be set
for the entire list.
Forwarding can also be configured on a per-domain basis, allowing for
the global forwarding options to be overridden in a variety of ways.

View File

@ -1,143 +0,0 @@
<!--
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
SPDX-License-Identifier: MPL-2.0
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
-->
Differentiate Services Code Point Support
Differentiate Services Code Point (DSCP) is implemented in IPv4 using the
TOS octet and in IPv6 using the TCLASS octet.
RFC 3542 defines the api to manipulate the TCLASS octet as part of
the advanced socket API. TCLASS is settable on both a socket and
packet basis (setsockopt/sendmsg) and the sent value can be retrieved
using recvmsg over UDP. Retrieval is undefined for TCP.
The Advanced socket API was not incorporated into the POSIX socket
API for IPv6 and may not be completely implemented in any OS.
For TOS setsockopt() supports setting of the field on a persocket
basis. TOS may also be set on a per packet basis on some OS using
sendmsg. If it is not supported the sendmsg call reports a error.
Support can only be determined by attempted to send a packet with
the option set. Retrieval of the sent TOS value is retrievable on
Linux. This can be determined at compile time.
DSCP values need to be compatible with TOS values as it is a re-use
of the field.
LIBISC:
We will need to be able to probe for the level of DSCP support. We
need to know if we can set it at the socket level, packet level and
if we can retrieve the DSCP value sent. This needs to be done
independently for IPv4 and IPv6.
#define ISC_NET_DSCPRECVV4 0x01 /* Can receive sent DSCP value IPv4 */
#define ISC_NET_DSCPRECVV6 0x02 /* Can receive sent DSCP value IPv6 */
#define ISC_NET_DSCPSETV4 0x04 /* Can set DSCP on socket IPv4 */
#define ISC_NET_DSCPSETV6 0x08 /* Can set DSCP on socket IPv6 */
#define ISC_NET_DSCPPKTV4 0x10 /* Can set DSCP on per packet IPv4 */
#define ISC_NET_DSCPPKTV6 0x20 /* Can set DSCP on per packet IPv6 */
#define ISC_NET_DSCPALL 0x3f /* All valid flags */
unsigned int
isc_net_probedscp(void);
/*%<
* Probe the level of DSCP support.
*/
We also need to be able to set DSCP values on a per socket basis, per packet
basis and to retrieve dscp values from received packet.
Setting dscp on a per socket basis shall be done using isc_socket_dscp.
void
isc_socket_dscp(isc_socket_t *sock, unsigned int dscp);
/*%<
* Requires:
*\li 'sock' is a valid socket.
*/
/*@}*/
isc_socketevent shall be extended to support the sending of and retrieval
of DSCP values. If ISC_SOCKEVENTATTR_DSCP is set then isc_socket_sendto2
shall set the DSCP value. isc_socket_recv shall set ISC_SOCKEVENTATTR_DSCP
and the dscp element if the OS returns the value via recvmsg.
#define ISC_SOCKEVENTATTR_DSCP 0x00040000U /* public */
struct isc_socketevent {
ISC_EVENT_COMMON(isc_socketevent_t);
isc_result_t result; /*%< OK, EOF, whatever else */
unsigned int minimum; /*%< minimum i/o for event */
unsigned int n; /*%< bytes read or written */
unsigned int offset; /*%< offset into buffer list */
isc_region_t region; /*%< for single-buffer i/o */
isc_bufferlist_t bufferlist; /*%< list of buffers */
isc_sockaddr_t address; /*%< source address */
isc_time_t timestamp; /*%< timestamp of packet recv */
struct in6_pktinfo pktinfo; /*%< ipv6 pktinfo */
uint32_t attributes; /*%< see below */
isc_eventdestructor_t destroy; /*%< original destructor */
unsigned int dscp; /*%< UDP dscp value */
};
A convenience function will be provided to allocate and initialize the structure.
isc_socketevent_t *
isc_socket_socketevent(isc_socket_t *sock0, isc_eventtype_t eventtype,
isc_taskaction_t action, const void *arg)
NAMED/LIBDNS:
Named needs to be able to set the DSCP value of sent traffic. We should
be able to set DSCP for all TCP connections.
For UDP we should have a default DSCP value for when we can't set this on
a per packet basis with the ability to override for specific destinations.
options/view/server;
tcp-dscp <value>;
udp-dscp <value>;
http://bogpeople.com/networking/dscp.shtml list a set of TOS compatible
values (below).
DSCP Name DS Field Value IP Precedence
Binary Decimal
CS0 000 000 0 0
CS1 001 000 8 1
AF11 001 010 10 1
AF12 001 100 12 1
AF13 001 110 14 1
CS2 010 000 16 2
AF21 010 010 18 2
AF22 010 100 20 2
AF23 010 110 22 2
CS3 011 000 24 3
AF31 011 010 26 3
AF32 011 100 28 3
AF33 011 110 30 3
CS4 100 000 32 4
AF41 100 010 34 4
AF42 100 100 36 4
AF43 100 110 38 4
CS5 101 000 40 5
EF 101 110 46 5
CS6 110 000 48 6
CS7 111 000 56 7
CS Class Selector (RFC 2474)
AFxy Assured Forwarding (x=class, y=drop precedence) (RFC2597)
EF Expedited Forwarding (RFC 3246)
value should be one of these or a numeric 0..63. The default value is 0.

View File

@ -403,9 +403,8 @@ given.
.INDENT 0.0
.TP
.B +dscp=value
This option sets the DSCP code point to be used when sending the query. Valid DSCP
code points are in the range [0...63]. By default no code point is
explicitly set.
This option formerly set the DSCP value used when sending a query.
It is now obsolete, and has no effect.
.UNINDENT
.INDENT 0.0
.TP

View File

@ -185,10 +185,9 @@ key ID is displayed as the replacement, e.g., \fB[ key id = value ]\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B +dscp[=value]
This option sets the DSCP code point to be used when sending the query. Valid DSCP
code points are in the range [0...63]. By default no code point is
explicitly set.
.B +dscp=value
This option formerly set the DSCP value used when sending a query.
It is now obsolete, and has no effect.
.UNINDENT
.INDENT 0.0
.TP

View File

@ -126,9 +126,9 @@ options {
allow\-transfer [ port <integer> ] [ transport <string> ] { <address_match_element>; ... };
allow\-update { <address_match_element>; ... };
allow\-update\-forwarding { <address_match_element>; ... };
also\-notify [ port <integer> ] [ dscp <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt\-transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
alt\-transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
also\-notify [ port <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt\-transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ]; // deprecated
alt\-transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ]; // deprecated
answer\-cookie <boolean>;
attach\-cache <string>;
auth\-nxdomain <boolean>;
@ -138,7 +138,7 @@ options {
avoid\-v6\-udp\-ports { <portrange>; ... };
bindkeys\-file <quoted_string>;
blackhole { <address_match_element>; ... };
catalog\-zones { zone <string> [ default\-primaries [ port <integer> ] [ dscp <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... } ] [ zone\-directory <quoted_string> ] [ in\-memory <boolean> ] [ min\-update\-interval <duration> ]; ... };
catalog\-zones { zone <string> [ default\-primaries [ port <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... } ] [ zone\-directory <quoted_string> ] [ in\-memory <boolean> ] [ min\-update\-interval <duration> ]; ... };
check\-dup\-records ( fail | warn | ignore );
check\-integrity <boolean>;
check\-mx ( fail | warn | ignore );
@ -185,8 +185,8 @@ options {
dnstap\-identity ( <quoted_string> | none | hostname ); // not configured
dnstap\-output ( file | unix ) <quoted_string> [ size ( unlimited | <size> ) ] [ versions ( unlimited | <integer> ) ] [ suffix ( increment | timestamp ) ]; // not configured
dnstap\-version ( <quoted_string> | none ); // not configured
dscp <integer>;
dual\-stack\-servers [ port <integer> ] { ( <quoted_string> [ port <integer> ] [ dscp <integer> ] | <ipv4_address> [ port <integer> ] [ dscp <integer> ] | <ipv6_address> [ port <integer> ] [ dscp <integer> ] ); ... };
dscp <integer>; // obsolete
dual\-stack\-servers [ port <integer> ] { ( <quoted_string> [ port <integer> ] | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ); ... };
dump\-file <quoted_string>;
edns\-udp\-size <integer>;
empty\-contact <string>;
@ -198,7 +198,7 @@ options {
files ( default | unlimited | <sizeval> ); // deprecated
flush\-zones\-on\-shutdown <boolean>;
forward ( first | only );
forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ dscp <integer> ]; ... };
forwarders [ port <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ]; ... };
fstrm\-set\-buffer\-hint <integer>; // not configured
fstrm\-set\-flush\-timeout <integer>; // not configured
fstrm\-set\-input\-queue\-size <integer>; // not configured
@ -222,8 +222,8 @@ options {
keep\-response\-order { <address_match_element>; ... };
key\-directory <quoted_string>;
lame\-ttl <duration>;
listen\-on [ port <integer> ] [ dscp <integer> ] [ tls <string> ] [ http <string> ] { <address_match_element>; ... }; // may occur multiple times
listen\-on\-v6 [ port <integer> ] [ dscp <integer> ] [ tls <string> ] [ http <string> ] { <address_match_element>; ... }; // may occur multiple times
listen\-on [ port <integer> ] [ tls <string> ] [ http <string> ] { <address_match_element>; ... }; // may occur multiple times
listen\-on\-v6 [ port <integer> ] [ tls <string> ] [ http <string> ] { <address_match_element>; ... }; // may occur multiple times
lmdb\-mapsize <sizeval>;
lock\-file ( <quoted_string> | none );
managed\-keys\-directory <quoted_string>;
@ -265,23 +265,23 @@ options {
notify ( explicit | master\-only | primary\-only | <boolean> );
notify\-delay <integer>;
notify\-rate <integer>;
notify\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
notify\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
notify\-to\-soa <boolean>;
nsec3\-test\-zone <boolean>; // test only
nta\-lifetime <duration>;
nta\-recheck <duration>;
nxdomain\-redirect <string>;
parental\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
parental\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
parental\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
parental\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
pid\-file ( <quoted_string> | none );
port <integer>;
preferred\-glue <string>;
prefetch <integer> [ <integer> ];
provide\-ixfr <boolean>;
qname\-minimization ( strict | relaxed | disabled | off );
query\-source ( ( [ address ] ( <ipv4_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ] port ( <integer> | * ) ) ) [ dscp <integer> ];
query\-source\-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ] port ( <integer> | * ) ) ) [ dscp <integer> ];
query\-source ( ( [ address ] ( <ipv4_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ] port ( <integer> | * ) ) );
query\-source\-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ] port ( <integer> | * ) ) );
querylog <boolean>;
random\-device ( <quoted_string> | none ); // obsolete
rate\-limit {
@ -357,8 +357,8 @@ options {
tls\-port <integer>;
transfer\-format ( many\-answers | one\-answer );
transfer\-message\-size <integer>;
transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
transfers\-in <integer>;
transfers\-out <integer>;
transfers\-per\-ns <integer>;
@ -378,11 +378,11 @@ options {
zone\-statistics ( full | terse | none | <boolean> );
};
parental\-agents <string> [ port <integer> ] [ dscp <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }; // may occur multiple times
parental\-agents <string> [ port <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }; // may occur multiple times
plugin ( query ) <string> [ { <unspecified\-text> } ]; // may occur multiple times
primaries <string> [ port <integer> ] [ dscp <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }; // may occur multiple times
primaries <string> [ port <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }; // may occur multiple times
server <netprefix> {
bogus <boolean>;
@ -391,12 +391,12 @@ server <netprefix> {
edns\-version <integer>;
keys <server_key>;
max\-udp\-size <integer>;
notify\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
notify\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
padding <integer>;
provide\-ixfr <boolean>;
query\-source ( ( [ address ] ( <ipv4_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ] port ( <integer> | * ) ) ) [ dscp <integer> ];
query\-source\-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ] port ( <integer> | * ) ) ) [ dscp <integer> ];
query\-source ( ( [ address ] ( <ipv4_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ] port ( <integer> | * ) ) );
query\-source\-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ] port ( <integer> | * ) ) );
request\-expire <boolean>;
request\-ixfr <boolean>;
request\-nsid <boolean>;
@ -404,8 +404,8 @@ server <netprefix> {
tcp\-keepalive <boolean>;
tcp\-only <boolean>;
transfer\-format ( many\-answers | one\-answer );
transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
transfers <integer>;
}; // may occur multiple times
@ -441,13 +441,13 @@ view <string> [ <class> ] {
allow\-transfer [ port <integer> ] [ transport <string> ] { <address_match_element>; ... };
allow\-update { <address_match_element>; ... };
allow\-update\-forwarding { <address_match_element>; ... };
also\-notify [ port <integer> ] [ dscp <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt\-transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
alt\-transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
also\-notify [ port <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt\-transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ]; // deprecated
alt\-transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ]; // deprecated
attach\-cache <string>;
auth\-nxdomain <boolean>;
auto\-dnssec ( allow | maintain | off ); // deprecated
catalog\-zones { zone <string> [ default\-primaries [ port <integer> ] [ dscp <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... } ] [ zone\-directory <quoted_string> ] [ in\-memory <boolean> ] [ min\-update\-interval <duration> ]; ... };
catalog\-zones { zone <string> [ default\-primaries [ port <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... } ] [ zone\-directory <quoted_string> ] [ in\-memory <boolean> ] [ min\-update\-interval <duration> ]; ... };
check\-dup\-records ( fail | warn | ignore );
check\-integrity <boolean>;
check\-mx ( fail | warn | ignore );
@ -490,7 +490,7 @@ view <string> [ <class> ] {
dnssec\-update\-mode ( maintain | no\-resign );
dnssec\-validation ( yes | no | auto );
dnstap { ( all | auth | client | forwarder | resolver | update ) [ ( query | response ) ]; ... }; // not configured
dual\-stack\-servers [ port <integer> ] { ( <quoted_string> [ port <integer> ] [ dscp <integer> ] | <ipv4_address> [ port <integer> ] [ dscp <integer> ] | <ipv6_address> [ port <integer> ] [ dscp <integer> ] ); ... };
dual\-stack\-servers [ port <integer> ] { ( <quoted_string> [ port <integer> ] | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ); ... };
dyndb <string> <quoted_string> { <unspecified\-text> }; // may occur multiple times
edns\-udp\-size <integer>;
empty\-contact <string>;
@ -500,7 +500,7 @@ view <string> [ <class> ] {
fetches\-per\-server <integer> [ ( drop | fail ) ];
fetches\-per\-zone <integer> [ ( drop | fail ) ];
forward ( first | only );
forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ dscp <integer> ]; ... };
forwarders [ port <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ]; ... };
glue\-cache <boolean>; // deprecated
ipv4only\-contact <string>;
ipv4only\-enable <boolean>;
@ -550,22 +550,22 @@ view <string> [ <class> ] {
nocookie\-udp\-size <integer>;
notify ( explicit | master\-only | primary\-only | <boolean> );
notify\-delay <integer>;
notify\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
notify\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
notify\-to\-soa <boolean>;
nsec3\-test\-zone <boolean>; // test only
nta\-lifetime <duration>;
nta\-recheck <duration>;
nxdomain\-redirect <string>;
parental\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
parental\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
parental\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
parental\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
plugin ( query ) <string> [ { <unspecified\-text> } ]; // may occur multiple times
preferred\-glue <string>;
prefetch <integer> [ <integer> ];
provide\-ixfr <boolean>;
qname\-minimization ( strict | relaxed | disabled | off );
query\-source ( ( [ address ] ( <ipv4_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ] port ( <integer> | * ) ) ) [ dscp <integer> ];
query\-source\-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ] port ( <integer> | * ) ) ) [ dscp <integer> ];
query\-source ( ( [ address ] ( <ipv4_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ] port ( <integer> | * ) ) );
query\-source\-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ] port ( <integer> | * ) ) );
rate\-limit {
all\-per\-second <integer>;
errors\-per\-second <integer>;
@ -605,12 +605,12 @@ view <string> [ <class> ] {
edns\-version <integer>;
keys <server_key>;
max\-udp\-size <integer>;
notify\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
notify\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
padding <integer>;
provide\-ixfr <boolean>;
query\-source ( ( [ address ] ( <ipv4_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ] port ( <integer> | * ) ) ) [ dscp <integer> ];
query\-source\-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ] port ( <integer> | * ) ) ) [ dscp <integer> ];
query\-source ( ( [ address ] ( <ipv4_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ] port ( <integer> | * ) ) );
query\-source\-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ] port ( <integer> | * ) ) );
request\-expire <boolean>;
request\-ixfr <boolean>;
request\-nsid <boolean>;
@ -618,8 +618,8 @@ view <string> [ <class> ] {
tcp\-keepalive <boolean>;
tcp\-only <boolean>;
transfer\-format ( many\-answers | one\-answer );
transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
transfers <integer>;
}; // may occur multiple times
servfail\-ttl <duration>;
@ -636,8 +636,8 @@ view <string> [ <class> ] {
suppress\-initial\-notify <boolean>; // obsolete
synth\-from\-dnssec <boolean>;
transfer\-format ( many\-answers | one\-answer );
transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
trust\-anchor\-telemetry <boolean>; // experimental
trust\-anchors { <string> ( static\-key | initial\-key | static\-ds | initial\-ds ) <integer> <integer> <integer> <quoted_string>; ... }; // may occur multiple times
trusted\-keys { <string> <integer> <integer> <integer> <quoted_string>; ... }; // may occur multiple times, deprecated
@ -669,9 +669,9 @@ zone <string> [ <class> ] {
allow\-query\-on { <address_match_element>; ... };
allow\-transfer [ port <integer> ] [ transport <string> ] { <address_match_element>; ... };
allow\-update { <address_match_element>; ... };
also\-notify [ port <integer> ] [ dscp <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt\-transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
alt\-transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
also\-notify [ port <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt\-transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ]; // deprecated
alt\-transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ]; // deprecated
auto\-dnssec ( allow | maintain | off ); // deprecated
check\-dup\-records ( fail | warn | ignore );
check\-integrity <boolean>;
@ -693,7 +693,7 @@ zone <string> [ <class> ] {
dnssec\-update\-mode ( maintain | no\-resign );
file <quoted_string>;
forward ( first | only );
forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ dscp <integer> ]; ... };
forwarders [ port <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ]; ... };
inline\-signing <boolean>;
ixfr\-from\-differences <boolean>;
journal <quoted_string>;
@ -708,13 +708,13 @@ zone <string> [ <class> ] {
max\-zone\-ttl ( unlimited | <duration> );
notify ( explicit | master\-only | primary\-only | <boolean> );
notify\-delay <integer>;
notify\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
notify\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
notify\-to\-soa <boolean>;
nsec3\-test\-zone <boolean>; // test only
parental\-agents [ port <integer> ] [ dscp <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
parental\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
parental\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
parental\-agents [ port <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
parental\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
parental\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
serial\-update\-method ( date | increment | unixtime );
sig\-signing\-nodes <integer>;
sig\-signing\-signatures <integer>;
@ -742,9 +742,9 @@ zone <string> [ <class> ] {
allow\-query\-on { <address_match_element>; ... };
allow\-transfer [ port <integer> ] [ transport <string> ] { <address_match_element>; ... };
allow\-update\-forwarding { <address_match_element>; ... };
also\-notify [ port <integer> ] [ dscp <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt\-transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
alt\-transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
also\-notify [ port <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt\-transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ]; // deprecated
alt\-transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ]; // deprecated
auto\-dnssec ( allow | maintain | off ); // deprecated
check\-names ( fail | warn | ignore );
database <string>;
@ -757,7 +757,7 @@ zone <string> [ <class> ] {
dnssec\-update\-mode ( maintain | no\-resign );
file <quoted_string>;
forward ( first | only );
forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ dscp <integer> ]; ... };
forwarders [ port <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ]; ... };
inline\-signing <boolean>;
ixfr\-from\-differences <boolean>;
journal <quoted_string>;
@ -778,22 +778,22 @@ zone <string> [ <class> ] {
multi\-master <boolean>;
notify ( explicit | master\-only | primary\-only | <boolean> );
notify\-delay <integer>;
notify\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
notify\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
notify\-to\-soa <boolean>;
nsec3\-test\-zone <boolean>; // test only
parental\-agents [ port <integer> ] [ dscp <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
parental\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
parental\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
primaries [ port <integer> ] [ dscp <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
parental\-agents [ port <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
parental\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
parental\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
primaries [ port <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
request\-expire <boolean>;
request\-ixfr <boolean>;
sig\-signing\-nodes <integer>;
sig\-signing\-signatures <integer>;
sig\-signing\-type <integer>;
sig\-validity\-interval <integer> [ <integer> ];
transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
try\-tcp\-refresh <boolean>;
update\-check\-ksk <boolean>;
use\-alt\-transfer\-source <boolean>; // deprecated
@ -817,9 +817,9 @@ zone <string> [ <class> ] {
allow\-query\-on { <address_match_element>; ... };
allow\-transfer [ port <integer> ] [ transport <string> ] { <address_match_element>; ... };
allow\-update\-forwarding { <address_match_element>; ... };
also\-notify [ port <integer> ] [ dscp <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt\-transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
alt\-transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
also\-notify [ port <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt\-transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ]; // deprecated
alt\-transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ]; // deprecated
check\-names ( fail | warn | ignore );
database <string>;
file <quoted_string>;
@ -841,13 +841,13 @@ zone <string> [ <class> ] {
multi\-master <boolean>;
notify ( explicit | master\-only | primary\-only | <boolean> );
notify\-delay <integer>;
notify\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
primaries [ port <integer> ] [ dscp <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
notify\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
notify\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
primaries [ port <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
request\-expire <boolean>;
request\-ixfr <boolean>;
transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
try\-tcp\-refresh <boolean>;
use\-alt\-transfer\-source <boolean>; // deprecated
zero\-no\-soa\-ttl <boolean>;
@ -867,7 +867,7 @@ zone <string> [ <class> ] {
type forward;
delegation\-only <boolean>;
forward ( first | only );
forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ dscp <integer> ]; ... };
forwarders [ port <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ]; ... };
};
.ft P
@ -905,7 +905,7 @@ zone <string> [ <class> ] {
masterfile\-style ( full | relative );
max\-records <integer>;
max\-zone\-ttl ( unlimited | <duration> );
primaries [ port <integer> ] [ dscp <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
primaries [ port <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
zone\-statistics ( full | terse | none | <boolean> );
};
@ -923,7 +923,7 @@ zone <string> [ <class> ] {
allow\-query { <address_match_element>; ... };
allow\-query\-on { <address_match_element>; ... };
forward ( first | only );
forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ dscp <integer> ]; ... };
forwarders [ port <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ]; ... };
max\-records <integer>;
server\-addresses { ( <ipv4_address> | <ipv6_address> ); ... };
server\-names { <string>; ... };
@ -949,7 +949,7 @@ zone <string> [ <class> ] {
dialup ( notify | notify\-passive | passive | refresh | <boolean> );
file <quoted_string>;
forward ( first | only );
forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ dscp <integer> ]; ... };
forwarders [ port <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ]; ... };
masterfile\-format ( raw | text );
masterfile\-style ( full | relative );
max\-records <integer>;
@ -960,9 +960,9 @@ zone <string> [ <class> ] {
min\-refresh\-time <integer>;
min\-retry\-time <integer>;
multi\-master <boolean>;
primaries [ port <integer> ] [ dscp <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
primaries [ port <integer> ] { ( <remote\-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
transfer\-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
transfer\-source\-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
use\-alt\-transfer\-source <boolean>; // deprecated
zone\-statistics ( full | terse | none | <boolean> );
};

View File

@ -2,5 +2,5 @@ zone <string> [ <class> ] {
type forward;
delegation-only <boolean>;
forward ( first | only );
forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ dscp <integer> ]; ... };
forwarders [ port <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ]; ... };
};

View File

@ -5,9 +5,9 @@ zone <string> [ <class> ] {
allow-query-on { <address_match_element>; ... };
allow-transfer [ port <integer> ] [ transport <string> ] { <address_match_element>; ... };
allow-update-forwarding { <address_match_element>; ... };
also-notify [ port <integer> ] [ dscp <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt-transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
alt-transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
also-notify [ port <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt-transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ]; // deprecated
alt-transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ]; // deprecated
check-names ( fail | warn | ignore );
database <string>;
file <quoted_string>;
@ -29,13 +29,13 @@ zone <string> [ <class> ] {
multi-master <boolean>;
notify ( explicit | master-only | primary-only | <boolean> );
notify-delay <integer>;
notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
primaries [ port <integer> ] [ dscp <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
primaries [ port <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
request-expire <boolean>;
request-ixfr <boolean>;
transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
try-tcp-refresh <boolean>;
use-alt-transfer-source <boolean>; // deprecated
zero-no-soa-ttl <boolean>;

View File

@ -69,9 +69,9 @@ options {
allow-transfer [ port <integer> ] [ transport <string> ] { <address_match_element>; ... };
allow-update { <address_match_element>; ... };
allow-update-forwarding { <address_match_element>; ... };
also-notify [ port <integer> ] [ dscp <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt-transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
alt-transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
also-notify [ port <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt-transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ]; // deprecated
alt-transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ]; // deprecated
answer-cookie <boolean>;
attach-cache <string>;
auth-nxdomain <boolean>;
@ -81,7 +81,7 @@ options {
avoid-v6-udp-ports { <portrange>; ... };
bindkeys-file <quoted_string>;
blackhole { <address_match_element>; ... };
catalog-zones { zone <string> [ default-primaries [ port <integer> ] [ dscp <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... } ] [ zone-directory <quoted_string> ] [ in-memory <boolean> ] [ min-update-interval <duration> ]; ... };
catalog-zones { zone <string> [ default-primaries [ port <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... } ] [ zone-directory <quoted_string> ] [ in-memory <boolean> ] [ min-update-interval <duration> ]; ... };
check-dup-records ( fail | warn | ignore );
check-integrity <boolean>;
check-mx ( fail | warn | ignore );
@ -128,8 +128,8 @@ options {
dnstap-identity ( <quoted_string> | none | hostname ); // not configured
dnstap-output ( file | unix ) <quoted_string> [ size ( unlimited | <size> ) ] [ versions ( unlimited | <integer> ) ] [ suffix ( increment | timestamp ) ]; // not configured
dnstap-version ( <quoted_string> | none ); // not configured
dscp <integer>;
dual-stack-servers [ port <integer> ] { ( <quoted_string> [ port <integer> ] [ dscp <integer> ] | <ipv4_address> [ port <integer> ] [ dscp <integer> ] | <ipv6_address> [ port <integer> ] [ dscp <integer> ] ); ... };
dscp <integer>; // obsolete
dual-stack-servers [ port <integer> ] { ( <quoted_string> [ port <integer> ] | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ); ... };
dump-file <quoted_string>;
edns-udp-size <integer>;
empty-contact <string>;
@ -141,7 +141,7 @@ options {
files ( default | unlimited | <sizeval> ); // deprecated
flush-zones-on-shutdown <boolean>;
forward ( first | only );
forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ dscp <integer> ]; ... };
forwarders [ port <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ]; ... };
fstrm-set-buffer-hint <integer>; // not configured
fstrm-set-flush-timeout <integer>; // not configured
fstrm-set-input-queue-size <integer>; // not configured
@ -165,8 +165,8 @@ options {
keep-response-order { <address_match_element>; ... };
key-directory <quoted_string>;
lame-ttl <duration>;
listen-on [ port <integer> ] [ dscp <integer> ] [ tls <string> ] [ http <string> ] { <address_match_element>; ... }; // may occur multiple times
listen-on-v6 [ port <integer> ] [ dscp <integer> ] [ tls <string> ] [ http <string> ] { <address_match_element>; ... }; // may occur multiple times
listen-on [ port <integer> ] [ tls <string> ] [ http <string> ] { <address_match_element>; ... }; // may occur multiple times
listen-on-v6 [ port <integer> ] [ tls <string> ] [ http <string> ] { <address_match_element>; ... }; // may occur multiple times
lmdb-mapsize <sizeval>;
lock-file ( <quoted_string> | none );
managed-keys-directory <quoted_string>;
@ -208,23 +208,23 @@ options {
notify ( explicit | master-only | primary-only | <boolean> );
notify-delay <integer>;
notify-rate <integer>;
notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
notify-to-soa <boolean>;
nsec3-test-zone <boolean>; // test only
nta-lifetime <duration>;
nta-recheck <duration>;
nxdomain-redirect <string>;
parental-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
parental-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
parental-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
parental-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
pid-file ( <quoted_string> | none );
port <integer>;
preferred-glue <string>;
prefetch <integer> [ <integer> ];
provide-ixfr <boolean>;
qname-minimization ( strict | relaxed | disabled | off );
query-source ( ( [ address ] ( <ipv4_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ] port ( <integer> | * ) ) ) [ dscp <integer> ];
query-source-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ] port ( <integer> | * ) ) ) [ dscp <integer> ];
query-source ( ( [ address ] ( <ipv4_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ] port ( <integer> | * ) ) );
query-source-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ] port ( <integer> | * ) ) );
querylog <boolean>;
random-device ( <quoted_string> | none ); // obsolete
rate-limit {
@ -300,8 +300,8 @@ options {
tls-port <integer>;
transfer-format ( many-answers | one-answer );
transfer-message-size <integer>;
transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
transfers-in <integer>;
transfers-out <integer>;
transfers-per-ns <integer>;
@ -321,11 +321,11 @@ options {
zone-statistics ( full | terse | none | <boolean> );
};
parental-agents <string> [ port <integer> ] [ dscp <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }; // may occur multiple times
parental-agents <string> [ port <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }; // may occur multiple times
plugin ( query ) <string> [ { <unspecified-text> } ]; // may occur multiple times
primaries <string> [ port <integer> ] [ dscp <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }; // may occur multiple times
primaries <string> [ port <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... }; // may occur multiple times
server <netprefix> {
bogus <boolean>;
@ -334,12 +334,12 @@ server <netprefix> {
edns-version <integer>;
keys <server_key>;
max-udp-size <integer>;
notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
padding <integer>;
provide-ixfr <boolean>;
query-source ( ( [ address ] ( <ipv4_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ] port ( <integer> | * ) ) ) [ dscp <integer> ];
query-source-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ] port ( <integer> | * ) ) ) [ dscp <integer> ];
query-source ( ( [ address ] ( <ipv4_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ] port ( <integer> | * ) ) );
query-source-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ] port ( <integer> | * ) ) );
request-expire <boolean>;
request-ixfr <boolean>;
request-nsid <boolean>;
@ -347,8 +347,8 @@ server <netprefix> {
tcp-keepalive <boolean>;
tcp-only <boolean>;
transfer-format ( many-answers | one-answer );
transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
transfers <integer>;
}; // may occur multiple times
@ -384,13 +384,13 @@ view <string> [ <class> ] {
allow-transfer [ port <integer> ] [ transport <string> ] { <address_match_element>; ... };
allow-update { <address_match_element>; ... };
allow-update-forwarding { <address_match_element>; ... };
also-notify [ port <integer> ] [ dscp <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt-transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
alt-transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
also-notify [ port <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt-transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ]; // deprecated
alt-transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ]; // deprecated
attach-cache <string>;
auth-nxdomain <boolean>;
auto-dnssec ( allow | maintain | off ); // deprecated
catalog-zones { zone <string> [ default-primaries [ port <integer> ] [ dscp <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... } ] [ zone-directory <quoted_string> ] [ in-memory <boolean> ] [ min-update-interval <duration> ]; ... };
catalog-zones { zone <string> [ default-primaries [ port <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... } ] [ zone-directory <quoted_string> ] [ in-memory <boolean> ] [ min-update-interval <duration> ]; ... };
check-dup-records ( fail | warn | ignore );
check-integrity <boolean>;
check-mx ( fail | warn | ignore );
@ -433,7 +433,7 @@ view <string> [ <class> ] {
dnssec-update-mode ( maintain | no-resign );
dnssec-validation ( yes | no | auto );
dnstap { ( all | auth | client | forwarder | resolver | update ) [ ( query | response ) ]; ... }; // not configured
dual-stack-servers [ port <integer> ] { ( <quoted_string> [ port <integer> ] [ dscp <integer> ] | <ipv4_address> [ port <integer> ] [ dscp <integer> ] | <ipv6_address> [ port <integer> ] [ dscp <integer> ] ); ... };
dual-stack-servers [ port <integer> ] { ( <quoted_string> [ port <integer> ] | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ); ... };
dyndb <string> <quoted_string> { <unspecified-text> }; // may occur multiple times
edns-udp-size <integer>;
empty-contact <string>;
@ -443,7 +443,7 @@ view <string> [ <class> ] {
fetches-per-server <integer> [ ( drop | fail ) ];
fetches-per-zone <integer> [ ( drop | fail ) ];
forward ( first | only );
forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ dscp <integer> ]; ... };
forwarders [ port <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ]; ... };
glue-cache <boolean>; // deprecated
ipv4only-contact <string>;
ipv4only-enable <boolean>;
@ -493,22 +493,22 @@ view <string> [ <class> ] {
nocookie-udp-size <integer>;
notify ( explicit | master-only | primary-only | <boolean> );
notify-delay <integer>;
notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
notify-to-soa <boolean>;
nsec3-test-zone <boolean>; // test only
nta-lifetime <duration>;
nta-recheck <duration>;
nxdomain-redirect <string>;
parental-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
parental-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
parental-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
parental-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
plugin ( query ) <string> [ { <unspecified-text> } ]; // may occur multiple times
preferred-glue <string>;
prefetch <integer> [ <integer> ];
provide-ixfr <boolean>;
qname-minimization ( strict | relaxed | disabled | off );
query-source ( ( [ address ] ( <ipv4_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ] port ( <integer> | * ) ) ) [ dscp <integer> ];
query-source-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ] port ( <integer> | * ) ) ) [ dscp <integer> ];
query-source ( ( [ address ] ( <ipv4_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ] port ( <integer> | * ) ) );
query-source-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ] port ( <integer> | * ) ) );
rate-limit {
all-per-second <integer>;
errors-per-second <integer>;
@ -548,12 +548,12 @@ view <string> [ <class> ] {
edns-version <integer>;
keys <server_key>;
max-udp-size <integer>;
notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
padding <integer>;
provide-ixfr <boolean>;
query-source ( ( [ address ] ( <ipv4_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ] port ( <integer> | * ) ) ) [ dscp <integer> ];
query-source-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ] port ( <integer> | * ) ) ) [ dscp <integer> ];
query-source ( ( [ address ] ( <ipv4_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ] port ( <integer> | * ) ) );
query-source-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port ( <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ] port ( <integer> | * ) ) );
request-expire <boolean>;
request-ixfr <boolean>;
request-nsid <boolean>;
@ -561,8 +561,8 @@ view <string> [ <class> ] {
tcp-keepalive <boolean>;
tcp-only <boolean>;
transfer-format ( many-answers | one-answer );
transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
transfers <integer>;
}; // may occur multiple times
servfail-ttl <duration>;
@ -579,8 +579,8 @@ view <string> [ <class> ] {
suppress-initial-notify <boolean>; // obsolete
synth-from-dnssec <boolean>;
transfer-format ( many-answers | one-answer );
transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
trust-anchor-telemetry <boolean>; // experimental
trust-anchors { <string> ( static-key | initial-key | static-ds | initial-ds ) <integer> <integer> <integer> <quoted_string>; ... }; // may occur multiple times
trusted-keys { <string> <integer> <integer> <integer> <quoted_string>; ... }; // may occur multiple times, deprecated

View File

@ -4,9 +4,9 @@ zone <string> [ <class> ] {
allow-query-on { <address_match_element>; ... };
allow-transfer [ port <integer> ] [ transport <string> ] { <address_match_element>; ... };
allow-update { <address_match_element>; ... };
also-notify [ port <integer> ] [ dscp <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt-transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
alt-transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
also-notify [ port <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt-transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ]; // deprecated
alt-transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ]; // deprecated
auto-dnssec ( allow | maintain | off ); // deprecated
check-dup-records ( fail | warn | ignore );
check-integrity <boolean>;
@ -28,7 +28,7 @@ zone <string> [ <class> ] {
dnssec-update-mode ( maintain | no-resign );
file <quoted_string>;
forward ( first | only );
forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ dscp <integer> ]; ... };
forwarders [ port <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ]; ... };
inline-signing <boolean>;
ixfr-from-differences <boolean>;
journal <quoted_string>;
@ -43,13 +43,13 @@ zone <string> [ <class> ] {
max-zone-ttl ( unlimited | <duration> );
notify ( explicit | master-only | primary-only | <boolean> );
notify-delay <integer>;
notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
notify-to-soa <boolean>;
nsec3-test-zone <boolean>; // test only
parental-agents [ port <integer> ] [ dscp <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
parental-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
parental-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
parental-agents [ port <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
parental-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
parental-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
serial-update-method ( date | increment | unixtime );
sig-signing-nodes <integer>;
sig-signing-signatures <integer>;

View File

@ -8,6 +8,6 @@ zone <string> [ <class> ] {
masterfile-style ( full | relative );
max-records <integer>;
max-zone-ttl ( unlimited | <duration> );
primaries [ port <integer> ] [ dscp <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
primaries [ port <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
zone-statistics ( full | terse | none | <boolean> );
};

View File

@ -12,7 +12,7 @@ options {
};
server <string> {
addresses { ( <quoted_string> [ port <integer> ] [ dscp <integer> ] | <ipv4_address> [ port <integer> ] [ dscp <integer> ] | <ipv6_address> [ port <integer> ] [ dscp <integer> ] ); ... };
addresses { ( <quoted_string> [ port <integer> ] | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ); ... };
key <string>;
port <integer>;
source-address ( <ipv4_address> | * );

View File

@ -5,9 +5,9 @@ zone <string> [ <class> ] {
allow-query-on { <address_match_element>; ... };
allow-transfer [ port <integer> ] [ transport <string> ] { <address_match_element>; ... };
allow-update-forwarding { <address_match_element>; ... };
also-notify [ port <integer> ] [ dscp <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt-transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
alt-transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ]; // deprecated
also-notify [ port <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
alt-transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ]; // deprecated
alt-transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ]; // deprecated
auto-dnssec ( allow | maintain | off ); // deprecated
check-names ( fail | warn | ignore );
database <string>;
@ -20,7 +20,7 @@ zone <string> [ <class> ] {
dnssec-update-mode ( maintain | no-resign );
file <quoted_string>;
forward ( first | only );
forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ dscp <integer> ]; ... };
forwarders [ port <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ]; ... };
inline-signing <boolean>;
ixfr-from-differences <boolean>;
journal <quoted_string>;
@ -41,22 +41,22 @@ zone <string> [ <class> ] {
multi-master <boolean>;
notify ( explicit | master-only | primary-only | <boolean> );
notify-delay <integer>;
notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
notify-to-soa <boolean>;
nsec3-test-zone <boolean>; // test only
parental-agents [ port <integer> ] [ dscp <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
parental-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
parental-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
primaries [ port <integer> ] [ dscp <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
parental-agents [ port <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
parental-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
parental-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
primaries [ port <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
request-expire <boolean>;
request-ixfr <boolean>;
sig-signing-nodes <integer>;
sig-signing-signatures <integer>;
sig-signing-type <integer>;
sig-validity-interval <integer> [ <integer> ];
transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
try-tcp-refresh <boolean>;
update-check-ksk <boolean>;
use-alt-transfer-source <boolean>; // deprecated

View File

@ -3,7 +3,7 @@ zone <string> [ <class> ] {
allow-query { <address_match_element>; ... };
allow-query-on { <address_match_element>; ... };
forward ( first | only );
forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ dscp <integer> ]; ... };
forwarders [ port <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ]; ... };
max-records <integer>;
server-addresses { ( <ipv4_address> | <ipv6_address> ); ... };
server-names { <string>; ... };

View File

@ -8,7 +8,7 @@ zone <string> [ <class> ] {
dialup ( notify | notify-passive | passive | refresh | <boolean> );
file <quoted_string>;
forward ( first | only );
forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ] [ dscp <integer> ]; ... };
forwarders [ port <integer> ] { ( <ipv4_address> | <ipv6_address> ) [ port <integer> ]; ... };
masterfile-format ( raw | text );
masterfile-style ( full | relative );
max-records <integer>;
@ -19,9 +19,9 @@ zone <string> [ <class> ] {
min-refresh-time <integer>;
min-retry-time <integer>;
multi-master <boolean>;
primaries [ port <integer> ] [ dscp <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
primaries [ port <integer> ] { ( <remote-servers> | <ipv4_address> [ port <integer> ] | <ipv6_address> [ port <integer> ] ) [ key <string> ] [ tls <string> ]; ... };
transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
use-alt-transfer-source <boolean>; // deprecated
zone-statistics ( full | terse | none | <boolean> );
};

View File

@ -909,28 +909,6 @@ typedef enum {
optlevel_zone
} optlevel_t;
static isc_result_t
check_dscp(const cfg_obj_t *options, isc_log_t *logctx) {
isc_result_t result = ISC_R_SUCCESS;
const cfg_obj_t *obj = NULL;
/*
* Check that DSCP setting is within range
*/
obj = NULL;
(void)cfg_map_get(options, "dscp", &obj);
if (obj != NULL) {
uint32_t dscp = cfg_obj_asuint32(obj);
if (dscp >= 64) {
cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
"'dscp' out of range (0-63)");
result = ISC_R_FAILURE;
}
}
return (result);
}
static isc_result_t
check_name(const char *str) {
dns_fixedname_t fixed;
@ -990,7 +968,7 @@ check_listener(const cfg_obj_t *listener, const cfg_obj_t *config,
isc_result_t tresult, result = ISC_R_SUCCESS;
const cfg_obj_t *ltup = NULL;
const cfg_obj_t *tlsobj = NULL, *httpobj = NULL;
const cfg_obj_t *portobj = NULL, *dscpobj = NULL;
const cfg_obj_t *portobj = NULL;
const cfg_obj_t *http_server = NULL;
bool do_tls = false, no_tls = false;
dns_acl_t *acl = NULL;
@ -1056,16 +1034,6 @@ check_listener(const cfg_obj_t *listener, const cfg_obj_t *config,
}
}
dscpobj = cfg_tuple_get(ltup, "dscp");
if (cfg_obj_isuint32(dscpobj) && cfg_obj_asuint32(dscpobj) > 63) {
cfg_obj_log(dscpobj, logctx, ISC_LOG_ERROR,
"dscp value '%u' is out of range",
cfg_obj_asuint32(dscpobj));
if (result == ISC_R_SUCCESS) {
result = ISC_R_RANGE;
}
}
tresult = cfg_acl_fromconfig(cfg_tuple_get(listener, "acl"), config,
logctx, actx, mctx, 0, &acl);
if (result == ISC_R_SUCCESS) {
@ -1596,11 +1564,6 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
}
}
tresult = check_dscp(options, logctx);
if (result == ISC_R_SUCCESS && tresult != ISC_R_SUCCESS) {
result = tresult;
}
obj = NULL;
(void)cfg_map_get(options, "nta-lifetime", &obj);
if (obj != NULL) {

View File

@ -2015,7 +2015,6 @@ new_adbaddrinfo(dns_adb_t *adb, dns_adbentry_t *entry, in_port_t port) {
ai->srtt = entry->srtt;
ai->flags = entry->flags;
ai->entry = entry;
ai->dscp = -1;
ISC_LINK_INIT(ai, publink);
return (ai);

View File

@ -422,7 +422,6 @@ dns_catz_entry_cmp(const dns_catz_entry_t *ea, const dns_catz_entry_t *eb) {
}
}
/* xxxwpk TODO compare dscps! */
return (true);
}
@ -1915,7 +1914,7 @@ cleanup:
* We have to generate a text buffer with regular zone config:
* zone "foo.bar" {
* type secondary;
* primaries [ dscp X ] { ip1 port port1; ip2 port port2; };
* primaries { ip1 port port1; ip2 port port2; };
* }
*/
isc_result_t
@ -1926,7 +1925,7 @@ dns_catz_generate_zonecfg(dns_catz_zone_t *zone, dns_catz_entry_t *entry,
isc_result_t result;
uint32_t i;
isc_netaddr_t netaddr;
char pbuf[sizeof("65535")]; /* used both for port number and DSCP */
char pbuf[sizeof("65535")]; /* used for port number */
char zname[DNS_NAME_FORMATSIZE];
REQUIRE(DNS_CATZ_ZONE_VALID(zone));
@ -1944,20 +1943,6 @@ dns_catz_generate_zonecfg(dns_catz_zone_t *zone, dns_catz_entry_t *entry,
dns_name_totext(&entry->name, true, buffer);
isc_buffer_putstr(buffer, "\" { type secondary; primaries");
/*
* DSCP value has no default, but when it is specified, it is
* identical for all primaries and cannot be overridden for a
* specific primary IP, so use the DSCP value set for the first
* primary.
*/
if (entry->opts.masters.count > 0 && entry->opts.masters.dscps[0] >= 0)
{
isc_buffer_putstr(buffer, " dscp ");
snprintf(pbuf, sizeof(pbuf), "%hd",
entry->opts.masters.dscps[0]);
isc_buffer_putstr(buffer, pbuf);
}
isc_buffer_putstr(buffer, " { ");
for (i = 0; i < entry->opts.masters.count; i++) {
/*

View File

@ -1152,15 +1152,12 @@ dispatch_allocate(dns_dispatchmgr_t *mgr, isc_socktype_t type,
isc_result_t
dns_dispatch_createtcp(dns_dispatchmgr_t *mgr, const isc_sockaddr_t *localaddr,
const isc_sockaddr_t *destaddr, isc_dscp_t dscp,
dns_dispatch_t **dispp) {
const isc_sockaddr_t *destaddr, dns_dispatch_t **dispp) {
dns_dispatch_t *disp = NULL;
REQUIRE(VALID_DISPATCHMGR(mgr));
REQUIRE(destaddr != NULL);
UNUSED(dscp);
LOCK(&mgr->lock);
dispatch_allocate(mgr, isc_socktype_tcp, &disp);
@ -2134,28 +2131,13 @@ dns_dispatch_resume(dns_dispentry_t *resp, uint16_t timeout) {
}
void
dns_dispatch_send(dns_dispentry_t *resp, isc_region_t *r, isc_dscp_t dscp) {
dns_dispatch_send(dns_dispentry_t *resp, isc_region_t *r) {
REQUIRE(VALID_RESPONSE(resp));
REQUIRE(VALID_DISPATCH(resp->disp));
UNUSED(dscp);
dns_dispatch_t *disp = resp->disp;
isc_nmhandle_t *sendhandle = NULL;
#if 0
/* XXX: no DSCP support */
if (dscp == -1) {
sendevent->attributes &= ~ISC_SOCKEVENTATTR_DSCP;
sendevent->dscp = 0;
} else {
sendevent->attributes |= ISC_SOCKEVENTATTR_DSCP;
sendevent->dscp = dscp;
if (tcp) {
isc_socket_dscp(sock, dscp);
}
}
#endif
dispentry_log(resp, LVL(90), "sending");
switch (disp->socktype) {
case isc_socktype_udp:

View File

@ -127,7 +127,6 @@ dns_fwdtable_add(dns_fwdtable_t *fwdtable, const dns_name_t *name,
{
fwd = isc_mem_get(fwdtable->mctx, sizeof(dns_forwarder_t));
fwd->addr = *sa;
fwd->dscp = -1;
ISC_LINK_INIT(fwd, link);
ISC_LIST_APPEND(forwarders->fwdrs, fwd, link);
}

View File

@ -219,7 +219,6 @@ struct dns_adbaddrinfo {
isc_sockaddr_t sockaddr; /*%< [rw] */
unsigned int srtt; /*%< [rw] microsecs */
isc_dscp_t dscp;
unsigned int flags; /*%< [rw] */
dns_adbentry_t *entry; /*%< private */

View File

@ -184,8 +184,7 @@ dns_dispatch_createudp(dns_dispatchmgr_t *mgr, const isc_sockaddr_t *localaddr,
isc_result_t
dns_dispatch_createtcp(dns_dispatchmgr_t *mgr, const isc_sockaddr_t *localaddr,
const isc_sockaddr_t *destaddr, isc_dscp_t dscp,
dns_dispatch_t **dispp);
const isc_sockaddr_t *destaddr, dns_dispatch_t **dispp);
/*%<
* Create a new TCP dns_dispatch.
*
@ -234,7 +233,7 @@ dns_dispatch_connect(dns_dispentry_t *resp);
*/
void
dns_dispatch_send(dns_dispentry_t *resp, isc_region_t *r, isc_dscp_t dscp);
dns_dispatch_send(dns_dispentry_t *resp, isc_region_t *r);
/*%<
* Send region 'r' using the socket in 'resp', then run the specified
* callback.

View File

@ -25,7 +25,6 @@ ISC_LANG_BEGINDECLS
struct dns_forwarder {
isc_sockaddr_t addr;
isc_dscp_t dscp;
ISC_LINK(dns_forwarder_t) link;
};

View File

@ -20,12 +20,11 @@
#include <dns/types.h>
/*%
* A structure holding a list of addresses, dscps and keys. Used to
* store primaries for a secondary zone, created by parsing config options.
* A structure holding a list of addresses and keys. Used to store
* primaries for a secondary zone, created by parsing config options.
*/
struct dns_ipkeylist {
isc_sockaddr_t *addrs;
isc_dscp_t *dscps;
dns_name_t **keys;
dns_name_t **tlss;
dns_name_t **labels;

View File

@ -200,24 +200,6 @@ dns_peer_setquerysource(dns_peer_t *peer, const isc_sockaddr_t *query_source);
isc_result_t
dns_peer_getquerysource(dns_peer_t *peer, isc_sockaddr_t *query_source);
isc_result_t
dns_peer_setnotifydscp(dns_peer_t *peer, isc_dscp_t dscp);
isc_result_t
dns_peer_getnotifydscp(dns_peer_t *peer, isc_dscp_t *dscpp);
isc_result_t
dns_peer_settransferdscp(dns_peer_t *peer, isc_dscp_t dscp);
isc_result_t
dns_peer_gettransferdscp(dns_peer_t *peer, isc_dscp_t *dscpp);
isc_result_t
dns_peer_setquerydscp(dns_peer_t *peer, isc_dscp_t dscp);
isc_result_t
dns_peer_getquerydscp(dns_peer_t *peer, isc_dscp_t *dscpp);
isc_result_t
dns_peer_setednsversion(dns_peer_t *peer, uint8_t ednsversion);

View File

@ -156,11 +156,10 @@ dns_requestmgr_detach(dns_requestmgr_t **requestmgrp);
isc_result_t
dns_request_create(dns_requestmgr_t *requestmgr, dns_message_t *message,
const isc_sockaddr_t *srcaddr,
const isc_sockaddr_t *destaddr, isc_dscp_t dscp,
unsigned int options, dns_tsigkey_t *key,
unsigned int timeout, unsigned int udptimeout,
unsigned int udpretries, isc_task_t *task,
isc_taskaction_t action, void *arg,
const isc_sockaddr_t *destaddr, unsigned int options,
dns_tsigkey_t *key, unsigned int timeout,
unsigned int udptimeout, unsigned int udpretries,
isc_task_t *task, isc_taskaction_t action, void *arg,
dns_request_t **requestp);
/*%<
* Create and send a request.
@ -200,10 +199,10 @@ dns_request_create(dns_requestmgr_t *requestmgr, dns_message_t *message,
isc_result_t
dns_request_createraw(dns_requestmgr_t *requestmgr, isc_buffer_t *msgbuf,
const isc_sockaddr_t *srcaddr,
const isc_sockaddr_t *destaddr, isc_dscp_t dscp,
unsigned int options, unsigned int timeout,
unsigned int udptimeout, unsigned int udpretries,
isc_task_t *task, isc_taskaction_t action, void *arg,
const isc_sockaddr_t *destaddr, unsigned int options,
unsigned int timeout, unsigned int udptimeout,
unsigned int udpretries, isc_task_t *task,
isc_taskaction_t action, void *arg,
dns_request_t **requestp);
/*!<
* \brief Create and send a request.

View File

@ -662,23 +662,6 @@ dns_resolver_printbadcache(dns_resolver_t *resolver, FILE *fp);
* \li resolver to be valid.
*/
void
dns_resolver_setquerydscp4(dns_resolver_t *resolver, isc_dscp_t dscp);
isc_dscp_t
dns_resolver_getquerydscp4(dns_resolver_t *resolver);
void
dns_resolver_setquerydscp6(dns_resolver_t *resolver, isc_dscp_t dscp);
isc_dscp_t
dns_resolver_getquerydscp6(dns_resolver_t *resolver);
/*%
* Get and set the DSCP values for the resolver's IPv4 and IPV6 query
* sources.
*
* Requires:
* \li resolver to be valid.
*/
void
dns_resolver_setmaxdepth(dns_resolver_t *resolver, unsigned int maxdepth);
unsigned int

View File

@ -50,10 +50,9 @@ ISC_LANG_BEGINDECLS
isc_result_t
dns_xfrin_create(dns_zone_t *zone, dns_rdatatype_t xfrtype,
const isc_sockaddr_t *primaryaddr,
const isc_sockaddr_t *sourceaddr, isc_dscp_t dscp,
dns_tsigkey_t *tsigkey, dns_transport_t *transport,
isc_tlsctx_cache_t *tlsctx_cache, isc_mem_t *mctx,
isc_nm_t *netmgr, dns_xfrindone_t done,
const isc_sockaddr_t *sourceaddr, dns_tsigkey_t *tsigkey,
dns_transport_t *transport, isc_tlsctx_cache_t *tlsctx_cache,
isc_mem_t *mctx, isc_nm_t *netmgr, dns_xfrindone_t done,
dns_xfrin_ctx_t **xfrp);
/*%<
* Attempt to start an incoming zone transfer of 'zone'

View File

@ -707,8 +707,8 @@ dns_zone_setparentals(dns_zone_t *zone, const isc_sockaddr_t *parentals,
void
dns_zone_setalsonotify(dns_zone_t *zone, const isc_sockaddr_t *notify,
const isc_dscp_t *dscps, dns_name_t **keynames,
dns_name_t **tlsnames, uint32_t count);
dns_name_t **keynames, dns_name_t **tlsnames,
uint32_t count);
/*%<
* Set the list of additional servers to be notified when
* a zone changes. To clear the list use 'count = 0'.
@ -858,31 +858,6 @@ dns_zone_getaltxfrsource4(dns_zone_t *zone);
*\li 'zone' to be a valid zone.
*/
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.
*
* Require:
*\li 'zone' to be a valid zone.
*
* Returns:
*\li #ISC_R_SUCCESS
*/
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.
*
* 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
@ -910,31 +885,6 @@ dns_zone_getaltxfrsource6(dns_zone_t *zone);
*\li 'zone' to be a valid zone.
*/
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.
*
* 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.
*
* Require:
*\li 'zone' to be a valid zone.
*
* Returns:
*\li #ISC_R_SUCCESS
*/
isc_result_t
dns_zone_setparentalsrc4(dns_zone_t *zone, const isc_sockaddr_t *parentalsrc);
/*%<
@ -958,27 +908,6 @@ dns_zone_getparentalsrc4(dns_zone_t *zone);
*\li 'zone' to be a valid zone.
*/
isc_dscp_t
dns_zone_getparentalsrc4dscp(dns_zone_t *zone);
/*%/
* Get the DSCP value associated with the IPv4 parental source.
*
* Require:
*\li 'zone' to be a valid zone.
*/
isc_result_t
dns_zone_setparentalsrc4dscp(dns_zone_t *zone, isc_dscp_t dscp);
/*%<
* Set the DSCP value associated with the IPv4 parental source.
*
* Require:
*\li 'zone' to be a valid zone.
*
* Returns:
*\li #ISC_R_SUCCESS
*/
isc_result_t
dns_zone_setparentalsrc6(dns_zone_t *zone, const isc_sockaddr_t *parentalsrc);
/*%<
@ -1002,27 +931,6 @@ dns_zone_getparentalsrc6(dns_zone_t *zone);
*\li 'zone' to be a valid zone.
*/
isc_dscp_t
dns_zone_getparentalsrc6dscp(dns_zone_t *zone);
/*%/
* Get the DSCP value associated with the IPv6 parental source.
*
* Require:
*\li 'zone' to be a valid zone.
*/
isc_result_t
dns_zone_setparentalsrc6dscp(dns_zone_t *zone, isc_dscp_t dscp);
/*%<
* Set the DSCP value associated with the IPv6 parental source.
*
* Require:
*\li 'zone' to be a valid zone.
*
* Returns:
*\li #ISC_R_SUCCESS
*/
isc_result_t
dns_zone_setnotifysrc4(dns_zone_t *zone, const isc_sockaddr_t *notifysrc);
/*%<
@ -1046,27 +954,6 @@ dns_zone_getnotifysrc4(dns_zone_t *zone);
*\li 'zone' to be a valid zone.
*/
isc_dscp_t
dns_zone_getnotifysrc4dscp(dns_zone_t *zone);
/*%/
* Get the DSCP value associated with the IPv4 notify source.
*
* Require:
*\li 'zone' to be a valid zone.
*/
isc_result_t
dns_zone_setnotifysrc4dscp(dns_zone_t *zone, isc_dscp_t dscp);
/*%<
* Set the DSCP value associated with the IPv4 notify source.
*
* Require:
*\li 'zone' to be a valid zone.
*
* Returns:
*\li #ISC_R_SUCCESS
*/
isc_result_t
dns_zone_setnotifysrc6(dns_zone_t *zone, const isc_sockaddr_t *notifysrc);
/*%<
@ -1090,27 +977,6 @@ dns_zone_getnotifysrc6(dns_zone_t *zone);
*\li 'zone' to be a valid zone.
*/
isc_dscp_t
dns_zone_getnotifysrc6dscp(dns_zone_t *zone);
/*%/
* Get the DSCP value associated with the IPv6 notify source.
*
* Require:
*\li 'zone' to be a valid zone.
*/
isc_result_t
dns_zone_setnotifysrc6dscp(dns_zone_t *zone, isc_dscp_t dscp);
/*%<
* Set the DSCP value associated with the IPv6 notify source.
*
* Require:
*\li 'zone' to be a valid zone.
*
* Returns:
*\li #ISC_R_SUCCESS
*/
void
dns_zone_setnotifyacl(dns_zone_t *zone, dns_acl_t *acl);
/*%<

View File

@ -26,7 +26,6 @@ dns_ipkeylist_init(dns_ipkeylist_t *ipkl) {
ipkl->count = 0;
ipkl->allocated = 0;
ipkl->addrs = NULL;
ipkl->dscps = NULL;
ipkl->keys = NULL;
ipkl->tlss = NULL;
ipkl->labels = NULL;
@ -47,11 +46,6 @@ dns_ipkeylist_clear(isc_mem_t *mctx, dns_ipkeylist_t *ipkl) {
ipkl->allocated * sizeof(isc_sockaddr_t));
}
if (ipkl->dscps != NULL) {
isc_mem_put(mctx, ipkl->dscps,
ipkl->allocated * sizeof(isc_dscp_t));
}
if (ipkl->keys != NULL) {
for (i = 0; i < ipkl->allocated; i++) {
if (ipkl->keys[i] == NULL) {
@ -118,11 +112,6 @@ dns_ipkeylist_copy(isc_mem_t *mctx, const dns_ipkeylist_t *src,
memmove(dst->addrs, src->addrs, src->count * sizeof(isc_sockaddr_t));
if (src->dscps != NULL) {
memmove(dst->dscps, src->dscps,
src->count * sizeof(isc_dscp_t));
}
if (src->keys != NULL) {
for (i = 0; i < src->count; i++) {
if (src->keys[i] != NULL) {
@ -169,7 +158,6 @@ dns_ipkeylist_copy(isc_mem_t *mctx, const dns_ipkeylist_t *src,
isc_result_t
dns_ipkeylist_resize(isc_mem_t *mctx, dns_ipkeylist_t *ipkl, unsigned int n) {
isc_sockaddr_t *addrs = NULL;
isc_dscp_t *dscps = NULL;
dns_name_t **keys = NULL;
dns_name_t **tlss = NULL;
dns_name_t **labels = NULL;
@ -182,7 +170,6 @@ dns_ipkeylist_resize(isc_mem_t *mctx, dns_ipkeylist_t *ipkl, unsigned int n) {
}
addrs = isc_mem_get(mctx, n * sizeof(isc_sockaddr_t));
dscps = isc_mem_get(mctx, n * sizeof(isc_dscp_t));
keys = isc_mem_get(mctx, n * sizeof(dns_name_t *));
tlss = isc_mem_get(mctx, n * sizeof(dns_name_t *));
labels = isc_mem_get(mctx, n * sizeof(dns_name_t *));
@ -197,16 +184,6 @@ dns_ipkeylist_resize(isc_mem_t *mctx, dns_ipkeylist_t *ipkl, unsigned int n) {
memset(&ipkl->addrs[ipkl->allocated], 0,
(n - ipkl->allocated) * sizeof(isc_sockaddr_t));
if (ipkl->dscps != NULL) {
memmove(dscps, ipkl->dscps,
ipkl->allocated * sizeof(isc_dscp_t));
isc_mem_put(mctx, ipkl->dscps,
ipkl->allocated * sizeof(isc_dscp_t));
}
ipkl->dscps = dscps;
memset(&ipkl->dscps[ipkl->allocated], 0,
(n - ipkl->allocated) * sizeof(isc_dscp_t));
if (ipkl->keys) {
memmove(keys, ipkl->keys,
ipkl->allocated * sizeof(dns_name_t *));
@ -241,7 +218,6 @@ dns_ipkeylist_resize(isc_mem_t *mctx, dns_ipkeylist_t *ipkl, unsigned int n) {
return (ISC_R_SUCCESS);
isc_mem_put(mctx, addrs, n * sizeof(isc_sockaddr_t));
isc_mem_put(mctx, dscps, n * sizeof(isc_dscp_t));
isc_mem_put(mctx, tlss, n * sizeof(dns_name_t *));
isc_mem_put(mctx, keys, n * sizeof(dns_name_t *));
isc_mem_put(mctx, labels, n * sizeof(dns_name_t *));

View File

@ -62,11 +62,8 @@ struct dns_peer {
bool check_axfr_id;
dns_name_t *key;
isc_sockaddr_t *transfer_source;
isc_dscp_t transfer_dscp;
isc_sockaddr_t *notify_source;
isc_dscp_t notify_dscp;
isc_sockaddr_t *query_source;
isc_dscp_t query_dscp;
uint16_t udpsize; /* receive size */
uint16_t maxudp; /* transmit size */
uint16_t padding; /* pad block size */
@ -90,14 +87,11 @@ struct dns_peer {
#define SERVER_MAXUDP_BIT 7
#define REQUEST_NSID_BIT 8
#define SEND_COOKIE_BIT 9
#define NOTIFY_DSCP_BIT 10
#define TRANSFER_DSCP_BIT 11
#define QUERY_DSCP_BIT 12
#define REQUEST_EXPIRE_BIT 13
#define EDNS_VERSION_BIT 14
#define FORCE_TCP_BIT 15
#define SERVER_PADDING_BIT 16
#define REQUEST_TCP_KEEPALIVE_BIT 17
#define REQUEST_EXPIRE_BIT 10
#define EDNS_VERSION_BIT 11
#define FORCE_TCP_BIT 12
#define SERVER_PADDING_BIT 13
#define REQUEST_TCP_KEEPALIVE_BIT 14
static void
peerlist_delete(dns_peerlist_t **list);
@ -880,72 +874,6 @@ dns_peer_getpadding(dns_peer_t *peer, uint16_t *padding) {
}
}
isc_result_t
dns_peer_setnotifydscp(dns_peer_t *peer, isc_dscp_t dscp) {
REQUIRE(DNS_PEER_VALID(peer));
REQUIRE(dscp < 64);
peer->notify_dscp = dscp;
DNS_BIT_SET(NOTIFY_DSCP_BIT, &peer->bitflags);
return (ISC_R_SUCCESS);
}
isc_result_t
dns_peer_getnotifydscp(dns_peer_t *peer, isc_dscp_t *dscpp) {
REQUIRE(DNS_PEER_VALID(peer));
REQUIRE(dscpp != NULL);
if (DNS_BIT_CHECK(NOTIFY_DSCP_BIT, &peer->bitflags)) {
*dscpp = peer->notify_dscp;
return (ISC_R_SUCCESS);
}
return (ISC_R_NOTFOUND);
}
isc_result_t
dns_peer_settransferdscp(dns_peer_t *peer, isc_dscp_t dscp) {
REQUIRE(DNS_PEER_VALID(peer));
REQUIRE(dscp < 64);
peer->transfer_dscp = dscp;
DNS_BIT_SET(TRANSFER_DSCP_BIT, &peer->bitflags);
return (ISC_R_SUCCESS);
}
isc_result_t
dns_peer_gettransferdscp(dns_peer_t *peer, isc_dscp_t *dscpp) {
REQUIRE(DNS_PEER_VALID(peer));
REQUIRE(dscpp != NULL);
if (DNS_BIT_CHECK(TRANSFER_DSCP_BIT, &peer->bitflags)) {
*dscpp = peer->transfer_dscp;
return (ISC_R_SUCCESS);
}
return (ISC_R_NOTFOUND);
}
isc_result_t
dns_peer_setquerydscp(dns_peer_t *peer, isc_dscp_t dscp) {
REQUIRE(DNS_PEER_VALID(peer));
REQUIRE(dscp < 64);
peer->query_dscp = dscp;
DNS_BIT_SET(QUERY_DSCP_BIT, &peer->bitflags);
return (ISC_R_SUCCESS);
}
isc_result_t
dns_peer_getquerydscp(dns_peer_t *peer, isc_dscp_t *dscpp) {
REQUIRE(DNS_PEER_VALID(peer));
REQUIRE(dscpp != NULL);
if (DNS_BIT_CHECK(QUERY_DSCP_BIT, &peer->bitflags)) {
*dscpp = peer->query_dscp;
return (ISC_R_SUCCESS);
}
return (ISC_R_NOTFOUND);
}
isc_result_t
dns_peer_setednsversion(dns_peer_t *peer, uint8_t ednsversion) {
REQUIRE(DNS_PEER_VALID(peer));

View File

@ -83,7 +83,6 @@ struct dns_request {
isc_sockaddr_t destaddr;
unsigned int timeout;
unsigned int udpcount;
isc_dscp_t dscp;
};
#define DNS_REQUEST_F_CONNECTING 0x0001
@ -353,7 +352,7 @@ req_send(dns_request_t *request) {
/* detached in req_senddone() */
req_attach(request, &(dns_request_t *){ NULL });
dns_dispatch_send(request->dispentry, &r, request->dscp);
dns_dispatch_send(request->dispentry, &r);
}
static isc_result_t
@ -361,7 +360,7 @@ new_request(isc_mem_t *mctx, dns_request_t **requestp) {
dns_request_t *request = NULL;
request = isc_mem_get(mctx, sizeof(*request));
*request = (dns_request_t){ .dscp = -1 };
*request = (dns_request_t){ 0 };
ISC_LINK_INIT(request, link);
isc_refcount_init(&request->references, 1);
@ -400,7 +399,7 @@ isblackholed(dns_dispatchmgr_t *dispatchmgr, const isc_sockaddr_t *destaddr) {
static isc_result_t
tcp_dispatch(bool newtcp, dns_requestmgr_t *requestmgr,
const isc_sockaddr_t *srcaddr, const isc_sockaddr_t *destaddr,
isc_dscp_t dscp, dns_dispatch_t **dispatchp) {
dns_dispatch_t **dispatchp) {
isc_result_t result;
if (!newtcp) {
@ -417,7 +416,7 @@ tcp_dispatch(bool newtcp, dns_requestmgr_t *requestmgr,
}
result = dns_dispatch_createtcp(requestmgr->dispatchmgr, srcaddr,
destaddr, dscp, dispatchp);
destaddr, dispatchp);
return (result);
}
@ -453,12 +452,12 @@ udp_dispatch(dns_requestmgr_t *requestmgr, const isc_sockaddr_t *srcaddr,
static isc_result_t
get_dispatch(bool tcp, bool newtcp, dns_requestmgr_t *requestmgr,
const isc_sockaddr_t *srcaddr, const isc_sockaddr_t *destaddr,
isc_dscp_t dscp, dns_dispatch_t **dispatchp) {
dns_dispatch_t **dispatchp) {
isc_result_t result;
if (tcp) {
result = tcp_dispatch(newtcp, requestmgr, srcaddr, destaddr,
dscp, dispatchp);
dispatchp);
} else {
result = udp_dispatch(requestmgr, srcaddr, destaddr, dispatchp);
}
@ -468,10 +467,10 @@ get_dispatch(bool tcp, bool newtcp, dns_requestmgr_t *requestmgr,
isc_result_t
dns_request_createraw(dns_requestmgr_t *requestmgr, isc_buffer_t *msgbuf,
const isc_sockaddr_t *srcaddr,
const isc_sockaddr_t *destaddr, isc_dscp_t dscp,
unsigned int options, unsigned int timeout,
unsigned int udptimeout, unsigned int udpretries,
isc_task_t *task, isc_taskaction_t action, void *arg,
const isc_sockaddr_t *destaddr, unsigned int options,
unsigned int timeout, unsigned int udptimeout,
unsigned int udpretries, isc_task_t *task,
isc_taskaction_t action, void *arg,
dns_request_t **requestp) {
dns_request_t *request = NULL;
isc_result_t result;
@ -512,7 +511,6 @@ dns_request_createraw(dns_requestmgr_t *requestmgr, isc_buffer_t *msgbuf,
}
request->udpcount = udpretries;
request->dscp = dscp;
request->event = (dns_requestevent_t *)isc_event_allocate(
mctx, task, DNS_EVENT_REQUESTDONE, action, arg,
@ -552,7 +550,7 @@ dns_request_createraw(dns_requestmgr_t *requestmgr, isc_buffer_t *msgbuf,
again:
result = get_dispatch(tcp, newtcp, requestmgr, srcaddr, destaddr, dscp,
result = get_dispatch(tcp, newtcp, requestmgr, srcaddr, destaddr,
&request->dispatch);
if (result != ISC_R_SUCCESS) {
goto detach;
@ -625,11 +623,10 @@ cleanup:
isc_result_t
dns_request_create(dns_requestmgr_t *requestmgr, dns_message_t *message,
const isc_sockaddr_t *srcaddr,
const isc_sockaddr_t *destaddr, isc_dscp_t dscp,
unsigned int options, dns_tsigkey_t *key,
unsigned int timeout, unsigned int udptimeout,
unsigned int udpretries, isc_task_t *task,
isc_taskaction_t action, void *arg,
const isc_sockaddr_t *destaddr, unsigned int options,
dns_tsigkey_t *key, unsigned int timeout,
unsigned int udptimeout, unsigned int udpretries,
isc_task_t *task, isc_taskaction_t action, void *arg,
dns_request_t **requestp) {
dns_request_t *request = NULL;
isc_result_t result;
@ -671,7 +668,6 @@ dns_request_create(dns_requestmgr_t *requestmgr, dns_message_t *message,
}
request->udpcount = udpretries;
request->dscp = dscp;
request->event = (dns_requestevent_t *)isc_event_allocate(
mctx, task, DNS_EVENT_REQUESTDONE, action, arg,
@ -707,7 +703,7 @@ dns_request_create(dns_requestmgr_t *requestmgr, dns_message_t *message,
req_attach(request, &(dns_request_t *){ NULL });
again:
result = get_dispatch(tcp, false, requestmgr, srcaddr, destaddr, dscp,
result = get_dispatch(tcp, false, requestmgr, srcaddr, destaddr,
&request->dispatch);
if (result != ISC_R_SUCCESS) {
goto detach;

View File

@ -282,7 +282,6 @@ typedef struct query {
isc_buffer_t buffer;
isc_buffer_t *tsig;
dns_tsigkey_t *tsigkey;
isc_dscp_t dscp;
int ednsversion;
unsigned int options;
unsigned int attributes;
@ -564,8 +563,6 @@ struct dns_resolver {
dns_dispatchmgr_t *dispatchmgr;
dns_dispatchset_t *dispatches4;
dns_dispatchset_t *dispatches6;
isc_dscp_t querydscp4;
isc_dscp_t querydscp6;
unsigned int nbuckets;
fctxbucket_t *buckets;
uint8_t dhashbits;
@ -2103,7 +2100,6 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
isc_sockaddr_t addr;
bool have_addr = false;
unsigned int srtt;
isc_dscp_t dscp = -1;
FCTXTRACE("query");
@ -2139,7 +2135,6 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
query = isc_mem_get(fctx->mctx, sizeof(*query));
*query = (resquery_t){ .mctx = fctx->mctx,
.options = options,
.dscp = addrinfo->dscp,
.addrinfo = addrinfo,
.dispatchmgr = res->dispatchmgr };
@ -2171,10 +2166,6 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
if (result == ISC_R_SUCCESS) {
have_addr = true;
}
result = dns_peer_getquerydscp(peer, &dscp);
if (result == ISC_R_SUCCESS) {
query->dscp = dscp;
}
result = dns_peer_getforcetcp(peer, &usetcp);
if (result == ISC_R_SUCCESS && usetcp) {
query->options |= DNS_FETCHOPT_TCP;
@ -2182,7 +2173,6 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
}
}
dscp = -1;
if ((query->options & DNS_FETCHOPT_TCP) != 0) {
int pf;
@ -2192,12 +2182,10 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
case PF_INET:
result = dns_dispatch_getlocaladdress(
res->dispatches4->dispatches[0], &addr);
dscp = dns_resolver_getquerydscp4(fctx->res);
break;
case PF_INET6:
result = dns_dispatch_getlocaladdress(
res->dispatches6->dispatches[0], &addr);
dscp = dns_resolver_getquerydscp6(fctx->res);
break;
default:
result = ISC_R_NOTIMPLEMENTED;
@ -2208,13 +2196,10 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
}
}
isc_sockaddr_setport(&addr, 0);
if (query->dscp == -1) {
query->dscp = dscp;
}
result = dns_dispatch_createtcp(res->dispatchmgr, &addr,
&addrinfo->sockaddr,
query->dscp, &query->dispatch);
&query->dispatch);
if (result != ISC_R_SUCCESS) {
goto cleanup_query;
}
@ -2222,17 +2207,6 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
FCTXTRACE("connecting via TCP");
} else {
if (have_addr) {
switch (isc_sockaddr_pf(&addr)) {
case AF_INET:
dscp = dns_resolver_getquerydscp4(fctx->res);
break;
case AF_INET6:
dscp = dns_resolver_getquerydscp6(fctx->res);
break;
default:
result = ISC_R_NOTIMPLEMENTED;
goto cleanup_query;
}
result = dns_dispatch_createudp(res->dispatchmgr, &addr,
&query->dispatch);
if (result != ISC_R_SUCCESS) {
@ -2244,13 +2218,11 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
dns_dispatch_attach(
dns_resolver_dispatchv4(res),
&query->dispatch);
dscp = dns_resolver_getquerydscp4(fctx->res);
break;
case PF_INET6:
dns_dispatch_attach(
dns_resolver_dispatchv6(res),
&query->dispatch);
dscp = dns_resolver_getquerydscp6(fctx->res);
break;
default:
result = ISC_R_NOTIMPLEMENTED;
@ -2258,9 +2230,6 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
}
}
if (query->dscp == -1) {
query->dscp = dscp;
}
/*
* We should always have a valid dispatcher here. If we
* don't support a protocol family, then its dispatcher
@ -2889,7 +2858,7 @@ resquery_send(resquery_t *query) {
isc_buffer_usedregion(&buffer, &r);
resquery_attach(query, &(resquery_t *){ NULL });
dns_dispatch_send(query->dispentry, &r, query->dscp);
dns_dispatch_send(query->dispentry, &r);
QTRACE("sent");
@ -3697,7 +3666,6 @@ fctx_getaddresses(fetchctx_t *fctx, bool badcache) {
if (result == ISC_R_SUCCESS) {
dns_adbaddrinfo_t *cur;
ai->flags |= FCTX_ADDRINFO_FORWARDER;
ai->dscp = fwd->dscp;
cur = ISC_LIST_HEAD(fctx->forwaddrs);
while (cur != NULL && cur->srtt < ai->srtt) {
cur = ISC_LIST_NEXT(cur, publink);
@ -10374,9 +10342,7 @@ dns_resolver_create(dns_view_t *view, isc_taskmgr_t *taskmgr,
.maxdepth = DEFAULT_RECURSION_DEPTH,
.maxqueries = DEFAULT_MAX_QUERIES,
.nbuckets = ntasks,
.dhashbits = RES_DOMAIN_HASH_BITS,
.querydscp4 = -1,
.querydscp6 = -1 };
.dhashbits = RES_DOMAIN_HASH_BITS };
atomic_init(&res->activebuckets, res->nbuckets);
@ -11613,32 +11579,6 @@ dns_resolver_settimeout(dns_resolver_t *resolver, unsigned int timeout) {
resolver->query_timeout = timeout;
}
void
dns_resolver_setquerydscp4(dns_resolver_t *resolver, isc_dscp_t dscp) {
REQUIRE(VALID_RESOLVER(resolver));
resolver->querydscp4 = dscp;
}
isc_dscp_t
dns_resolver_getquerydscp4(dns_resolver_t *resolver) {
REQUIRE(VALID_RESOLVER(resolver));
return (resolver->querydscp4);
}
void
dns_resolver_setquerydscp6(dns_resolver_t *resolver, isc_dscp_t dscp) {
REQUIRE(VALID_RESOLVER(resolver));
resolver->querydscp6 = dscp;
}
isc_dscp_t
dns_resolver_getquerydscp6(dns_resolver_t *resolver) {
REQUIRE(VALID_RESOLVER(resolver));
return (resolver->querydscp6);
}
void
dns_resolver_setmaxdepth(dns_resolver_t *resolver, unsigned int maxdepth) {
REQUIRE(VALID_RESOLVER(resolver));

View File

@ -120,7 +120,6 @@ struct dns_xfrin_ctx {
* may differ due to IXFR->AXFR fallback.
*/
dns_rdatatype_t reqtype;
isc_dscp_t dscp;
isc_sockaddr_t primaryaddr;
isc_sockaddr_t sourceaddr;
@ -200,9 +199,9 @@ static void
xfrin_create(isc_mem_t *mctx, dns_zone_t *zone, dns_db_t *db, isc_nm_t *netmgr,
dns_name_t *zonename, dns_rdataclass_t rdclass,
dns_rdatatype_t reqtype, const isc_sockaddr_t *primaryaddr,
const isc_sockaddr_t *sourceaddr, isc_dscp_t dscp,
dns_tsigkey_t *tsigkey, dns_transport_t *transport,
isc_tlsctx_cache_t *tlsctx_cache, dns_xfrin_ctx_t **xfrp);
const isc_sockaddr_t *sourceaddr, dns_tsigkey_t *tsigkey,
dns_transport_t *transport, isc_tlsctx_cache_t *tlsctx_cache,
dns_xfrin_ctx_t **xfrp);
static isc_result_t
axfr_init(dns_xfrin_ctx_t *xfr);
@ -695,10 +694,9 @@ failure:
isc_result_t
dns_xfrin_create(dns_zone_t *zone, dns_rdatatype_t xfrtype,
const isc_sockaddr_t *primaryaddr,
const isc_sockaddr_t *sourceaddr, isc_dscp_t dscp,
dns_tsigkey_t *tsigkey, dns_transport_t *transport,
isc_tlsctx_cache_t *tlsctx_cache, isc_mem_t *mctx,
isc_nm_t *netmgr, dns_xfrindone_t done,
const isc_sockaddr_t *sourceaddr, dns_tsigkey_t *tsigkey,
dns_transport_t *transport, isc_tlsctx_cache_t *tlsctx_cache,
isc_mem_t *mctx, isc_nm_t *netmgr, dns_xfrindone_t done,
dns_xfrin_ctx_t **xfrp) {
dns_name_t *zonename = dns_zone_getorigin(zone);
dns_xfrin_ctx_t *xfr = NULL;
@ -716,7 +714,7 @@ dns_xfrin_create(dns_zone_t *zone, dns_rdatatype_t xfrtype,
}
xfrin_create(mctx, zone, db, netmgr, zonename, dns_zone_getclass(zone),
xfrtype, primaryaddr, sourceaddr, dscp, tsigkey, transport,
xfrtype, primaryaddr, sourceaddr, tsigkey, transport,
tlsctx_cache, &xfr);
if (db != NULL) {
@ -864,9 +862,9 @@ static void
xfrin_create(isc_mem_t *mctx, dns_zone_t *zone, dns_db_t *db, isc_nm_t *netmgr,
dns_name_t *zonename, dns_rdataclass_t rdclass,
dns_rdatatype_t reqtype, const isc_sockaddr_t *primaryaddr,
const isc_sockaddr_t *sourceaddr, isc_dscp_t dscp,
dns_tsigkey_t *tsigkey, dns_transport_t *transport,
isc_tlsctx_cache_t *tlsctx_cache, dns_xfrin_ctx_t **xfrp) {
const isc_sockaddr_t *sourceaddr, dns_tsigkey_t *tsigkey,
dns_transport_t *transport, isc_tlsctx_cache_t *tlsctx_cache,
dns_xfrin_ctx_t **xfrp) {
dns_xfrin_ctx_t *xfr = NULL;
xfr = isc_mem_get(mctx, sizeof(*xfr));
@ -874,7 +872,6 @@ xfrin_create(isc_mem_t *mctx, dns_zone_t *zone, dns_db_t *db, isc_nm_t *netmgr,
.shutdown_result = ISC_R_UNSET,
.rdclass = rdclass,
.reqtype = reqtype,
.dscp = dscp,
.id = (dns_messageid_t)isc_random16(),
.maxrecords = dns_zone_getmaxrecords(zone),
.primaryaddr = *primaryaddr,
@ -1256,7 +1253,6 @@ xfrin_connect_done(isc_nmhandle_t *handle, isc_result_t result, void *cbarg) {
xfr->handle = handle;
sockaddr = isc_nmhandle_peeraddr(handle);
isc_sockaddr_format(&sockaddr, sourcetext, sizeof(sourcetext));
/* TODO set DSCP */
if (xfr->tsigkey != NULL && xfr->tsigkey->key != NULL) {
dns_name_format(dst_key_name(xfr->tsigkey->key), signerbuf,

View File

@ -311,7 +311,6 @@ struct dns_zone {
uint32_t maxrecords;
isc_sockaddr_t *primaries;
isc_dscp_t *primarydscps;
dns_name_t **primarykeynames;
dns_name_t **primarytlsnames;
bool *primariesok;
@ -320,7 +319,6 @@ struct dns_zone {
isc_sockaddr_t primaryaddr;
isc_sockaddr_t *parentals;
isc_dscp_t *parentaldscps;
dns_name_t **parentalkeynames;
dns_name_t **parentaltlsnames;
dns_dnsseckeylist_t checkds_ok;
@ -331,7 +329,6 @@ struct dns_zone {
isc_sockaddr_t *notify;
dns_name_t **notifykeynames;
dns_name_t **notifytlsnames;
isc_dscp_t *notifydscp;
unsigned int notifycnt;
isc_sockaddr_t notifyfrom;
isc_task_t *task;
@ -345,14 +342,6 @@ struct dns_zone {
isc_sockaddr_t altxfrsource4;
isc_sockaddr_t altxfrsource6;
isc_sockaddr_t sourceaddr;
isc_dscp_t notifysrc4dscp;
isc_dscp_t notifysrc6dscp;
isc_dscp_t parentalsrc4dscp;
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_transport_t *transport; /* transport used for xfr */
@ -679,7 +668,6 @@ struct dns_notify {
isc_sockaddr_t dst;
dns_tsigkey_t *key;
dns_transport_t *transport;
isc_dscp_t dscp;
ISC_LINK(dns_notify_t) link;
isc_event_t *event;
};
@ -699,7 +687,6 @@ struct dns_checkds {
isc_sockaddr_t dst;
dns_tsigkey_t *key;
dns_transport_t *transport;
isc_dscp_t dscp;
ISC_LINK(dns_checkds_t) link;
isc_event_t *event;
};
@ -1071,7 +1058,6 @@ struct ssevent {
struct stub_cb_args {
dns_stub_t *stub;
dns_tsigkey_t *tsig_key;
isc_dscp_t dscp;
uint16_t udpsize;
int timeout;
bool reqnsid;
@ -1118,14 +1104,6 @@ dns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx) {
.check_names = dns_severity_ignore,
.idlein = DNS_DEFAULT_IDLEIN,
.idleout = DNS_DEFAULT_IDLEOUT,
.notifysrc4dscp = -1,
.notifysrc6dscp = -1,
.parentalsrc4dscp = -1,
.parentalsrc6dscp = -1,
.xfrsource4dscp = -1,
.xfrsource6dscp = -1,
.altxfrsource4dscp = -1,
.altxfrsource6dscp = -1,
.maxxfrin = MAX_XFER_TIME,
.maxxfrout = MAX_XFER_TIME,
.sigvalidityinterval = 30 * 24 * 3600,
@ -1359,7 +1337,8 @@ zone_free(dns_zone_t *zone) {
zone_freedbargs(zone);
dns_zone_setparentals(zone, NULL, NULL, NULL, 0);
dns_zone_setprimaries(zone, NULL, NULL, NULL, 0);
dns_zone_setalsonotify(zone, NULL, NULL, NULL, NULL, 0);
dns_zone_setalsonotify(zone, NULL, NULL, NULL, 0);
zone->check_names = dns_severity_ignore;
if (zone->update_acl != NULL) {
dns_acl_detach(&zone->update_acl);
@ -5982,23 +5961,6 @@ dns_zone_getxfrsource4(dns_zone_t *zone) {
return (&zone->xfrsource4);
}
isc_result_t
dns_zone_setxfrsource4dscp(dns_zone_t *zone, isc_dscp_t dscp) {
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
zone->xfrsource4dscp = dscp;
UNLOCK_ZONE(zone);
return (ISC_R_SUCCESS);
}
isc_dscp_t
dns_zone_getxfrsource4dscp(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
return (zone->xfrsource4dscp);
}
isc_result_t
dns_zone_setxfrsource6(dns_zone_t *zone, const isc_sockaddr_t *xfrsource) {
REQUIRE(DNS_ZONE_VALID(zone));
@ -6016,23 +5978,6 @@ dns_zone_getxfrsource6(dns_zone_t *zone) {
return (&zone->xfrsource6);
}
isc_dscp_t
dns_zone_getxfrsource6dscp(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
return (zone->xfrsource6dscp);
}
isc_result_t
dns_zone_setxfrsource6dscp(dns_zone_t *zone, isc_dscp_t dscp) {
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
zone->xfrsource6dscp = dscp;
UNLOCK_ZONE(zone);
return (ISC_R_SUCCESS);
}
isc_result_t
dns_zone_setaltxfrsource4(dns_zone_t *zone,
const isc_sockaddr_t *altxfrsource) {
@ -6051,23 +5996,6 @@ dns_zone_getaltxfrsource4(dns_zone_t *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) {
@ -6086,23 +6014,6 @@ dns_zone_getaltxfrsource6(dns_zone_t *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));
@ -6120,23 +6031,6 @@ dns_zone_getparentalsrc4(dns_zone_t *zone) {
return (&zone->parentalsrc4);
}
isc_result_t
dns_zone_setparentalsrc4dscp(dns_zone_t *zone, isc_dscp_t dscp) {
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
zone->parentalsrc4dscp = dscp;
UNLOCK_ZONE(zone);
return (ISC_R_SUCCESS);
}
isc_dscp_t
dns_zone_getparentalsrc4dscp(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
return (zone->parentalsrc4dscp);
}
isc_result_t
dns_zone_setparentalsrc6(dns_zone_t *zone, const isc_sockaddr_t *parentalsrc) {
REQUIRE(DNS_ZONE_VALID(zone));
@ -6154,23 +6048,6 @@ dns_zone_getparentalsrc6(dns_zone_t *zone) {
return (&zone->parentalsrc6);
}
isc_result_t
dns_zone_setparentalsrc6dscp(dns_zone_t *zone, isc_dscp_t dscp) {
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
zone->parentalsrc6dscp = dscp;
UNLOCK_ZONE(zone);
return (ISC_R_SUCCESS);
}
isc_dscp_t
dns_zone_getparentalsrc6dscp(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
return (zone->parentalsrc6dscp);
}
isc_result_t
dns_zone_setnotifysrc4(dns_zone_t *zone, const isc_sockaddr_t *notifysrc) {
REQUIRE(DNS_ZONE_VALID(zone));
@ -6188,23 +6065,6 @@ dns_zone_getnotifysrc4(dns_zone_t *zone) {
return (&zone->notifysrc4);
}
isc_result_t
dns_zone_setnotifysrc4dscp(dns_zone_t *zone, isc_dscp_t dscp) {
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
zone->notifysrc4dscp = dscp;
UNLOCK_ZONE(zone);
return (ISC_R_SUCCESS);
}
isc_dscp_t
dns_zone_getnotifysrc4dscp(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
return (zone->notifysrc4dscp);
}
isc_result_t
dns_zone_setnotifysrc6(dns_zone_t *zone, const isc_sockaddr_t *notifysrc) {
REQUIRE(DNS_ZONE_VALID(zone));
@ -6222,23 +6082,6 @@ dns_zone_getnotifysrc6(dns_zone_t *zone) {
return (&zone->notifysrc6);
}
isc_result_t
dns_zone_setnotifysrc6dscp(dns_zone_t *zone, isc_dscp_t dscp) {
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
zone->notifysrc6dscp = dscp;
UNLOCK_ZONE(zone);
return (ISC_R_SUCCESS);
}
isc_dscp_t
dns_zone_getnotifysrc6dscp(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
return (zone->notifysrc6dscp);
}
static bool
same_addrs(isc_sockaddr_t const *oldlist, isc_sockaddr_t const *newlist,
uint32_t count) {
@ -6278,18 +6121,16 @@ same_names(dns_name_t *const *oldlist, dns_name_t *const *newlist,
}
static void
clear_serverslist(isc_sockaddr_t **addrsp, isc_dscp_t **dscpsp,
dns_name_t ***keynamesp, dns_name_t ***tlsnamesp,
unsigned int *countp, isc_mem_t *mctx) {
clear_serverslist(isc_sockaddr_t **addrsp, dns_name_t ***keynamesp,
dns_name_t ***tlsnamesp, unsigned int *countp,
isc_mem_t *mctx) {
unsigned int count;
isc_sockaddr_t *addrs;
isc_dscp_t *dscps;
dns_name_t **keynames;
dns_name_t **tlsnames;
REQUIRE(countp != NULL);
REQUIRE(addrsp != NULL);
REQUIRE(dscpsp != NULL);
REQUIRE(keynamesp != NULL);
REQUIRE(tlsnamesp != NULL);
@ -6297,8 +6138,6 @@ clear_serverslist(isc_sockaddr_t **addrsp, isc_dscp_t **dscpsp,
*countp = 0;
addrs = *addrsp;
*addrsp = NULL;
dscps = *dscpsp;
*dscpsp = NULL;
keynames = *keynamesp;
*keynamesp = NULL;
tlsnames = *tlsnamesp;
@ -6308,10 +6147,6 @@ clear_serverslist(isc_sockaddr_t **addrsp, isc_dscp_t **dscpsp,
isc_mem_put(mctx, addrs, count * sizeof(isc_sockaddr_t));
}
if (dscps != NULL) {
isc_mem_put(mctx, dscps, count * sizeof(isc_dscp_t));
}
if (keynames != NULL) {
unsigned int i;
for (i = 0; i < count; i++) {
@ -6341,31 +6176,21 @@ clear_serverslist(isc_sockaddr_t **addrsp, isc_dscp_t **dscpsp,
static void
set_serverslist(unsigned int count, const isc_sockaddr_t *addrs,
isc_sockaddr_t **newaddrsp, const isc_dscp_t *dscp,
isc_dscp_t **newdscpp, dns_name_t **keynames,
isc_sockaddr_t **newaddrsp, dns_name_t **keynames,
dns_name_t ***newkeynamesp, dns_name_t **tlsnames,
dns_name_t ***newtlsnamesp, isc_mem_t *mctx) {
isc_sockaddr_t *newaddrs = NULL;
isc_dscp_t *newdscp = NULL;
dns_name_t **newkeynames = NULL;
dns_name_t **newtlsnames = NULL;
unsigned int i;
REQUIRE(newaddrsp != NULL && *newaddrsp == NULL);
REQUIRE(newdscpp != NULL && *newdscpp == NULL);
REQUIRE(newkeynamesp != NULL && *newkeynamesp == NULL);
REQUIRE(newtlsnamesp != NULL && *newtlsnamesp == NULL);
newaddrs = isc_mem_get(mctx, count * sizeof(*newaddrs));
memmove(newaddrs, addrs, count * sizeof(*newaddrs));
if (dscp != NULL) {
newdscp = isc_mem_get(mctx, count * sizeof(*newdscp));
memmove(newdscp, dscp, count * sizeof(*newdscp));
} else {
newdscp = NULL;
}
if (keynames != NULL) {
newkeynames = isc_mem_get(mctx, count * sizeof(*newkeynames));
for (i = 0; i < count; i++) {
@ -6396,7 +6221,6 @@ set_serverslist(unsigned int count, const isc_sockaddr_t *addrs,
}
}
*newdscpp = newdscp;
*newaddrsp = newaddrs;
*newkeynamesp = newkeynames;
*newtlsnamesp = newtlsnames;
@ -6404,10 +6228,9 @@ set_serverslist(unsigned int count, const isc_sockaddr_t *addrs,
void
dns_zone_setalsonotify(dns_zone_t *zone, const isc_sockaddr_t *notify,
const isc_dscp_t *dscps, dns_name_t **keynames,
dns_name_t **tlsnames, uint32_t count) {
dns_name_t **keynames, dns_name_t **tlsnames,
uint32_t count) {
isc_sockaddr_t *newaddrs = NULL;
isc_dscp_t *newdscps = NULL;
dns_name_t **newkeynames = NULL;
dns_name_t **newtlsnames = NULL;
@ -6427,9 +6250,8 @@ dns_zone_setalsonotify(dns_zone_t *zone, const isc_sockaddr_t *notify,
goto unlock;
}
clear_serverslist(&zone->notify, &zone->notifydscp,
&zone->notifykeynames, &zone->notifytlsnames,
&zone->notifycnt, zone->mctx);
clear_serverslist(&zone->notify, &zone->notifykeynames,
&zone->notifytlsnames, &zone->notifycnt, zone->mctx);
if (count == 0) {
goto unlock;
@ -6438,14 +6260,13 @@ dns_zone_setalsonotify(dns_zone_t *zone, const isc_sockaddr_t *notify,
/*
* Set up the notify and notifykey lists
*/
set_serverslist(count, notify, &newaddrs, dscps, &newdscps, keynames,
&newkeynames, tlsnames, &newtlsnames, zone->mctx);
set_serverslist(count, notify, &newaddrs, keynames, &newkeynames,
tlsnames, &newtlsnames, zone->mctx);
/*
* Everything is ok so attach to the zone.
*/
zone->notify = newaddrs;
zone->notifydscp = newdscps;
zone->notifykeynames = newkeynames;
zone->notifytlsnames = newtlsnames;
zone->notifycnt = count;
@ -6458,7 +6279,6 @@ dns_zone_setprimaries(dns_zone_t *zone, const isc_sockaddr_t *primaries,
dns_name_t **keynames, dns_name_t **tlsnames,
uint32_t count) {
isc_sockaddr_t *newaddrs = NULL;
isc_dscp_t *newdscps = NULL;
dns_name_t **newkeynames = NULL;
dns_name_t **newtlsnames = NULL;
bool *newok;
@ -6498,9 +6318,9 @@ dns_zone_setprimaries(dns_zone_t *zone, const isc_sockaddr_t *primaries,
zone->primariescnt * sizeof(bool));
zone->primariesok = NULL;
}
clear_serverslist(&zone->primaries, &zone->primarydscps,
&zone->primarykeynames, &zone->primarytlsnames,
&zone->primariescnt, zone->mctx);
clear_serverslist(&zone->primaries, &zone->primarykeynames,
&zone->primarytlsnames, &zone->primariescnt,
zone->mctx);
/*
* If count == 0, don't allocate any space for primaries, primariesok or
* keynames so internally, those pointers are NULL if count == 0
@ -6520,9 +6340,8 @@ dns_zone_setprimaries(dns_zone_t *zone, const isc_sockaddr_t *primaries,
/*
* Now set up the primaries and primary key lists
*/
set_serverslist(count, primaries, &newaddrs, NULL, &newdscps, keynames,
&newkeynames, tlsnames, &newtlsnames, zone->mctx);
INSIST(newdscps == NULL);
set_serverslist(count, primaries, &newaddrs, keynames, &newkeynames,
tlsnames, &newtlsnames, zone->mctx);
/*
* Everything is ok so attach to the zone.
@ -6530,7 +6349,6 @@ dns_zone_setprimaries(dns_zone_t *zone, const isc_sockaddr_t *primaries,
zone->curprimary = 0;
zone->primariesok = newok;
zone->primaries = newaddrs;
zone->primarydscps = newdscps;
zone->primarykeynames = newkeynames;
zone->primarytlsnames = newtlsnames;
zone->primariescnt = count;
@ -6545,7 +6363,6 @@ dns_zone_setparentals(dns_zone_t *zone, const isc_sockaddr_t *parentals,
dns_name_t **keynames, dns_name_t **tlsnames,
uint32_t count) {
isc_sockaddr_t *newaddrs = NULL;
isc_dscp_t *newdscps = NULL;
dns_name_t **newkeynames = NULL;
dns_name_t **newtlsnames = NULL;
@ -6557,9 +6374,9 @@ dns_zone_setparentals(dns_zone_t *zone, const isc_sockaddr_t *parentals,
LOCK_ZONE(zone);
clear_serverslist(&zone->parentals, &zone->parentaldscps,
&zone->parentalkeynames, &zone->parentaltlsnames,
&zone->parentalscnt, zone->mctx);
clear_serverslist(&zone->parentals, &zone->parentalkeynames,
&zone->parentaltlsnames, &zone->parentalscnt,
zone->mctx);
/*
* If count == 0, don't allocate any space for parentals, or keynames
* so internally, those pointers are NULL if count == 0
@ -6571,15 +6388,13 @@ dns_zone_setparentals(dns_zone_t *zone, const isc_sockaddr_t *parentals,
/*
* Now set up the parentals and parental key lists
*/
set_serverslist(count, parentals, &newaddrs, NULL, &newdscps, keynames,
&newkeynames, tlsnames, &newtlsnames, zone->mctx);
INSIST(newdscps == NULL);
set_serverslist(count, parentals, &newaddrs, keynames, &newkeynames,
tlsnames, &newtlsnames, zone->mctx);
/*
* Everything is ok so attach to the zone.
*/
zone->parentals = newaddrs;
zone->parentaldscps = newdscps;
zone->parentalkeynames = newkeynames;
zone->parentaltlsnames = newtlsnames;
zone->parentalscnt = count;
@ -12777,8 +12592,6 @@ notify_send_toaddr(isc_task_t *task, isc_event_t *event) {
isc_sockaddr_t src;
unsigned int options, timeout;
bool have_notifysource = false;
bool have_notifydscp = false;
isc_dscp_t dscp = -1;
notify = event->ev_arg;
REQUIRE(DNS_NOTIFY_VALID(notify));
@ -12861,10 +12674,6 @@ notify_send_toaddr(isc_task_t *task, isc_event_t *event) {
if (result == ISC_R_SUCCESS) {
have_notifysource = true;
}
dns_peer_getnotifydscp(peer, &dscp);
if (dscp != -1) {
have_notifydscp = true;
}
result = dns_peer_getforcetcp(peer, &usetcp);
if (result == ISC_R_SUCCESS && usetcp) {
options |= DNS_FETCHOPT_TCP;
@ -12876,17 +12685,11 @@ notify_send_toaddr(isc_task_t *task, isc_event_t *event) {
if (!have_notifysource) {
src = notify->zone->notifysrc4;
}
if (!have_notifydscp) {
dscp = notify->zone->notifysrc4dscp;
}
break;
case PF_INET6:
if (!have_notifysource) {
src = notify->zone->notifysrc6;
}
if (!have_notifydscp) {
dscp = notify->zone->notifysrc6dscp;
}
break;
default:
result = ISC_R_NOTIMPLEMENTED;
@ -12897,7 +12700,7 @@ notify_send_toaddr(isc_task_t *task, isc_event_t *event) {
timeout = 30;
}
result = dns_request_create(notify->zone->view->requestmgr, message,
&src, &notify->dst, dscp, options, key,
&src, &notify->dst, options, key,
timeout * 3, timeout, 2, notify->zone->task,
notify_done, notify, &notify->request);
if (result == ISC_R_SUCCESS) {
@ -13630,8 +13433,8 @@ stub_request_nameserver_address(struct stub_cb_args *args, bool ipv4,
result = dns_request_create(
zone->view->requestmgr, message, &zone->sourceaddr,
&zone->primaryaddr, args->dscp, DNS_REQUESTOPT_TCP,
args->tsig_key, args->timeout * 3, args->timeout, 2, zone->task,
&zone->primaryaddr, DNS_REQUESTOPT_TCP, args->tsig_key,
args->timeout * 3, args->timeout, 2, zone->task,
stub_glue_response_cb, request, &request->request);
if (result != ISC_R_SUCCESS) {
@ -14693,9 +14496,8 @@ soa_query(isc_task_t *task, isc_event_t *event) {
uint32_t options;
bool cancel = true;
int timeout;
bool have_xfrsource, have_xfrdscp, reqnsid, reqexpire;
bool have_xfrsource = false, reqnsid, reqexpire;
uint16_t udpsize = SEND_BUFFER_SIZE;
isc_dscp_t dscp = -1;
bool do_queue_xfrin = false;
REQUIRE(DNS_ZONE_VALID(zone));
@ -14771,7 +14573,6 @@ again:
options = DNS_ZONE_FLAG(zone, DNS_ZONEFLG_USEVC) ? DNS_REQUESTOPT_TCP
: 0;
have_xfrsource = have_xfrdscp = false;
reqnsid = zone->view->requestnsid;
reqexpire = zone->requestexpire;
if (zone->view->peers != NULL) {
@ -14789,10 +14590,6 @@ again:
if (result == ISC_R_SUCCESS) {
have_xfrsource = true;
}
(void)dns_peer_gettransferdscp(peer, &dscp);
if (dscp != -1) {
have_xfrdscp = true;
}
if (zone->view->resolver != NULL) {
udpsize = dns_resolver_getudpsize(
zone->view->resolver);
@ -14816,14 +14613,8 @@ again:
goto skip_primary;
}
zone->sourceaddr = zone->altxfrsource4;
if (!have_xfrdscp) {
dscp = zone->altxfrsource4dscp;
}
} else if (!have_xfrsource) {
zone->sourceaddr = zone->xfrsource4;
if (!have_xfrdscp) {
dscp = zone->xfrsource4dscp;
}
}
break;
case PF_INET6:
@ -14834,14 +14625,8 @@ again:
goto skip_primary;
}
zone->sourceaddr = zone->altxfrsource6;
if (!have_xfrdscp) {
dscp = zone->altxfrsource6dscp;
}
} else if (!have_xfrsource) {
zone->sourceaddr = zone->xfrsource6;
if (!have_xfrdscp) {
dscp = zone->xfrsource6dscp;
}
}
break;
default:
@ -14883,7 +14668,7 @@ again:
}
result = dns_request_create(
zone->view->requestmgr, message, &zone->sourceaddr,
&zone->primaryaddr, dscp, options, key, timeout * 3, timeout, 2,
&zone->primaryaddr, options, key, timeout * 3, timeout, 2,
zone->task, refresh_callback, zone, &zone->request);
if (result != ISC_R_SUCCESS) {
zone_idetach(&dummy);
@ -14955,10 +14740,9 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) {
dns_tsigkey_t *key = NULL;
dns_dbnode_t *node = NULL;
int timeout;
bool have_xfrsource = false, have_xfrdscp = false;
bool have_xfrsource = false;
bool reqnsid;
uint16_t udpsize = SEND_BUFFER_SIZE;
isc_dscp_t dscp = -1;
struct stub_cb_args *cb_args;
REQUIRE(DNS_ZONE_VALID(zone));
@ -15094,10 +14878,6 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) {
if (result == ISC_R_SUCCESS) {
have_xfrsource = true;
}
result = dns_peer_gettransferdscp(peer, &dscp);
if (result == ISC_R_SUCCESS && dscp != -1) {
have_xfrdscp = true;
}
if (zone->view->resolver != NULL) {
udpsize = dns_resolver_getudpsize(
zone->view->resolver);
@ -15122,27 +14902,15 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) {
case PF_INET:
if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_USEALTXFRSRC)) {
zone->sourceaddr = zone->altxfrsource4;
if (!have_xfrdscp) {
dscp = zone->altxfrsource4dscp;
}
} else if (!have_xfrsource) {
zone->sourceaddr = zone->xfrsource4;
if (!have_xfrdscp) {
dscp = zone->xfrsource4dscp;
}
}
break;
case PF_INET6:
if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_USEALTXFRSRC)) {
zone->sourceaddr = zone->altxfrsource6;
if (!have_xfrdscp) {
dscp = zone->altxfrsource6dscp;
}
} else if (!have_xfrsource) {
zone->sourceaddr = zone->xfrsource6;
if (!have_xfrdscp) {
dscp = zone->xfrsource6dscp;
}
}
break;
default:
@ -15162,14 +14930,13 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) {
cb_args = isc_mem_get(zone->mctx, sizeof(*cb_args));
cb_args->stub = stub;
cb_args->tsig_key = key;
cb_args->dscp = dscp;
cb_args->udpsize = udpsize;
cb_args->timeout = timeout;
cb_args->reqnsid = reqnsid;
result = dns_request_create(
zone->view->requestmgr, message, &zone->sourceaddr,
&zone->primaryaddr, dscp, DNS_REQUESTOPT_TCP, key, timeout * 3,
&zone->primaryaddr, DNS_REQUESTOPT_TCP, key, timeout * 3,
timeout, 2, zone->task, stub_callback, cb_args, &zone->request);
if (result != ISC_R_SUCCESS) {
zone_debuglog(zone, me, 1, "dns_request_create() failed: %s",
@ -18242,7 +18009,6 @@ got_transfer_quota(isc_task_t *task, isc_event_t *event) {
isc_sockaddr_t primaryaddr;
isc_time_t now;
const char *soa_before = "";
isc_dscp_t dscp = -1;
bool loaded;
UNUSED(task);
@ -18375,27 +18141,9 @@ got_transfer_quota(isc_task_t *task, isc_event_t *event) {
isc_result_totext(result));
}
if (zone->primarydscps != NULL) {
dscp = zone->primarydscps[zone->curprimary];
}
LOCK_ZONE(zone);
primaryaddr = zone->primaryaddr;
sourceaddr = zone->sourceaddr;
switch (isc_sockaddr_pf(&primaryaddr)) {
case PF_INET:
if (dscp == -1) {
dscp = zone->xfrsource4dscp;
}
break;
case PF_INET6:
if (dscp == -1) {
dscp = zone->xfrsource6dscp;
}
break;
default:
UNREACHABLE();
}
UNLOCK_ZONE(zone);
INSIST(isc_sockaddr_pf(&primaryaddr) == isc_sockaddr_pf(&sourceaddr));
@ -18403,7 +18151,7 @@ got_transfer_quota(isc_task_t *task, isc_event_t *event) {
dns_xfrin_detach(&zone->xfr);
}
CHECK(dns_xfrin_create(zone, xfrtype, &primaryaddr, &sourceaddr, dscp,
CHECK(dns_xfrin_create(zone, xfrtype, &primaryaddr, &sourceaddr,
zone->tsigkey, zone->transport,
zone->zmgr->tlsctx_cache, zone->mctx,
zone->zmgr->netmgr, zone_xfrdone, &zone->xfr));
@ -18464,7 +18212,6 @@ static isc_result_t
sendtoprimary(dns_forward_t *forward) {
isc_result_t result;
isc_sockaddr_t src;
isc_dscp_t dscp = -1;
LOCK_ZONE(forward->zone);
@ -18488,11 +18235,9 @@ sendtoprimary(dns_forward_t *forward) {
switch (isc_sockaddr_pf(&forward->addr)) {
case PF_INET:
src = forward->zone->xfrsource4;
dscp = forward->zone->xfrsource4dscp;
break;
case PF_INET6:
src = forward->zone->xfrsource6;
dscp = forward->zone->xfrsource6dscp;
break;
default:
result = ISC_R_NOTIMPLEMENTED;
@ -18500,8 +18245,8 @@ sendtoprimary(dns_forward_t *forward) {
}
result = dns_request_createraw(forward->zone->view->requestmgr,
forward->msgbuf, &src, &forward->addr,
dscp, forward->options, 15 /* XXX */, 0,
0, forward->zone->task, forward_callback,
forward->options, 15 /* XXX */, 0, 0,
forward->zone->task, forward_callback,
forward, &forward->request);
if (result == ISC_R_SUCCESS) {
if (!ISC_LINK_LINKED(forward, link)) {
@ -21347,8 +21092,6 @@ checkds_send_toaddr(isc_task_t *task, isc_event_t *event) {
isc_sockaddr_t src;
unsigned int options, timeout;
bool have_checkdssource = false;
bool have_checkdsdscp = false;
isc_dscp_t dscp = -1;
checkds = event->ev_arg;
REQUIRE(DNS_CHECKDS_VALID(checkds));
@ -21433,10 +21176,6 @@ checkds_send_toaddr(isc_task_t *task, isc_event_t *event) {
if (result == ISC_R_SUCCESS) {
have_checkdssource = true;
}
dns_peer_getquerydscp(peer, &dscp);
if (dscp != -1) {
have_checkdsdscp = true;
}
result = dns_peer_getforcetcp(peer, &usetcp);
if (result == ISC_R_SUCCESS && usetcp) {
options |= DNS_FETCHOPT_TCP;
@ -21448,17 +21187,11 @@ checkds_send_toaddr(isc_task_t *task, isc_event_t *event) {
if (!have_checkdssource) {
src = checkds->zone->parentalsrc4;
}
if (!have_checkdsdscp) {
dscp = checkds->zone->parentalsrc4dscp;
}
break;
case PF_INET6:
if (!have_checkdssource) {
src = checkds->zone->parentalsrc6;
}
if (!have_checkdsdscp) {
dscp = checkds->zone->parentalsrc6dscp;
}
break;
default:
result = ISC_R_NOTIMPLEMENTED;
@ -21472,8 +21205,8 @@ checkds_send_toaddr(isc_task_t *task, isc_event_t *event) {
options |= DNS_REQUESTOPT_TCP;
result = dns_request_create(
checkds->zone->view->requestmgr, message, &src, &checkds->dst,
dscp, options, key, timeout * 3, timeout, 2,
checkds->zone->task, checkds_done, checkds, &checkds->request);
options, key, timeout * 3, timeout, 2, checkds->zone->task,
checkds_done, checkds, &checkds->request);
if (result != ISC_R_SUCCESS) {
dns_zone_log(checkds->zone, ISC_LOG_DEBUG(3),
"checkds: dns_request_create() to %s failed: %s",

View File

@ -272,20 +272,6 @@ isc_net_probeunix(void);
* Returns whether UNIX domain sockets are supported.
*/
#define ISC_NET_DSCPRECVV4 0x01 /* Can receive sent DSCP value IPv4 */
#define ISC_NET_DSCPRECVV6 0x02 /* Can receive sent DSCP value IPv6 */
#define ISC_NET_DSCPSETV4 0x04 /* Can set DSCP on socket IPv4 */
#define ISC_NET_DSCPSETV6 0x08 /* Can set DSCP on socket IPv6 */
#define ISC_NET_DSCPPKTV4 0x10 /* Can set DSCP on per packet IPv4 */
#define ISC_NET_DSCPPKTV6 0x20 /* Can set DSCP on per packet IPv6 */
#define ISC_NET_DSCPALL 0x3f /* All valid flags */
unsigned int
isc_net_probedscp(void);
/*%<
* Probe the level of DSCP support.
*/
isc_result_t
isc_net_getudpportrange(int af, in_port_t *low, in_port_t *high);
/*%<

View File

@ -41,7 +41,6 @@ typedef struct isc_constregion isc_constregion_t; /*%< Const region */
typedef struct isc_consttextregion isc_consttextregion_t; /*%< Const Text Region
*/
typedef struct isc_counter isc_counter_t; /*%< Counter */
typedef int16_t isc_dscp_t; /*%< Diffserv code point */
typedef struct isc_event isc_event_t; /*%< Event */
typedef ISC_LIST(isc_event_t) isc_eventlist_t; /*%< Event List */
typedef unsigned int isc_eventtype_t; /*%< Event Type */

View File

@ -109,14 +109,12 @@ static isc_once_t once_ipv6pktinfo = ISC_ONCE_INIT;
#endif /* ! ISC_CMSG_IP_TOS */
static isc_once_t once = ISC_ONCE_INIT;
static isc_once_t once_dscp = ISC_ONCE_INIT;
static isc_result_t ipv4_result = ISC_R_NOTFOUND;
static isc_result_t ipv6_result = ISC_R_NOTFOUND;
static isc_result_t unix_result = ISC_R_NOTFOUND;
static isc_result_t ipv6only_result = ISC_R_NOTFOUND;
static isc_result_t ipv6pktinfo_result = ISC_R_NOTFOUND;
static unsigned int dscp_result = 0;
static isc_result_t
try_proto(int domain) {
@ -346,342 +344,6 @@ isc_net_probe_ipv6pktinfo(void) {
return (ipv6pktinfo_result);
}
#if ISC_CMSG_IP_TOS || defined(IPV6_TCLASS)
static socklen_t
cmsg_len(socklen_t len) {
#ifdef CMSG_LEN
return (CMSG_LEN(len));
#else /* ifdef CMSG_LEN */
socklen_t hdrlen;
/*
* Cast NULL so that any pointer arithmetic performed by CMSG_DATA
* is correct.
*/
hdrlen = (socklen_t)CMSG_DATA(((struct cmsghdr *)NULL));
return (hdrlen + len);
#endif /* ifdef CMSG_LEN */
}
static socklen_t
cmsg_space(socklen_t len) {
#ifdef CMSG_SPACE
return (CMSG_SPACE(len));
#else /* ifdef CMSG_SPACE */
struct msghdr msg;
struct cmsghdr *cmsgp;
/*
* XXX: The buffer length is an ad-hoc value, but should be enough
* in a practical sense.
*/
char dummybuf[sizeof(struct cmsghdr) + 1024];
memset(&msg, 0, sizeof(msg));
msg.msg_control = dummybuf;
msg.msg_controllen = sizeof(dummybuf);
cmsgp = (struct cmsghdr *)dummybuf;
cmsgp->cmsg_len = cmsg_len(len);
cmsgp = CMSG_NXTHDR(&msg, cmsgp);
if (cmsgp != NULL) {
return ((char *)cmsgp - (char *)msg.msg_control);
} else {
return (0);
}
#endif /* ifdef CMSG_SPACE */
}
/*
* Make a fd non-blocking.
*/
static isc_result_t
make_nonblock(int fd) {
int ret;
int flags;
#ifdef USE_FIONBIO_IOCTL
flags = 1;
ret = ioctl(fd, FIONBIO, (char *)&flags);
#else /* ifdef USE_FIONBIO_IOCTL */
flags = fcntl(fd, F_GETFL, 0);
flags |= O_NONBLOCK;
ret = fcntl(fd, F_SETFL, flags);
#endif /* ifdef USE_FIONBIO_IOCTL */
if (ret == -1) {
#ifdef USE_FIONBIO_IOCTL
UNEXPECTED_SYSERROR(errno, "ioctl(%d, FIONBIO, &on)", fd);
#else
UNEXPECTED_SYSERROR(errno, "fcntl(%d, F_SETFL, %d)", fd, flags);
#endif
return (ISC_R_UNEXPECTED);
}
return (ISC_R_SUCCESS);
}
static bool
cmsgsend(int s, int level, int type, struct addrinfo *res) {
char strbuf[ISC_STRERRORSIZE];
struct sockaddr_storage ss;
socklen_t len = sizeof(ss);
struct msghdr msg;
union {
struct cmsghdr h;
unsigned char b[256];
} control;
struct cmsghdr *cmsgp;
int dscp = (46 << 2); /* Expedited forwarding. */
struct iovec iovec;
char buf[1] = { 0 };
isc_result_t result;
if (bind(s, res->ai_addr, res->ai_addrlen) < 0) {
strerror_r(errno, strbuf, sizeof(strbuf));
isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(10),
"bind: %s", strbuf);
return (false);
}
if (getsockname(s, (struct sockaddr *)&ss, &len) < 0) {
strerror_r(errno, strbuf, sizeof(strbuf));
isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(10),
"getsockname: %s", strbuf);
return (false);
}
iovec.iov_base = buf;
iovec.iov_len = sizeof(buf);
memset(&msg, 0, sizeof(msg));
msg.msg_name = (struct sockaddr *)&ss;
msg.msg_namelen = len;
msg.msg_iov = &iovec;
msg.msg_iovlen = 1;
msg.msg_control = (void *)&control;
msg.msg_controllen = 0;
msg.msg_flags = 0;
cmsgp = msg.msg_control;
switch (type) {
#ifdef IP_TOS
case IP_TOS:
memset(cmsgp, 0, cmsg_space(sizeof(char)));
cmsgp->cmsg_level = level;
cmsgp->cmsg_type = type;
cmsgp->cmsg_len = cmsg_len(sizeof(char));
*(unsigned char *)CMSG_DATA(cmsgp) = dscp;
msg.msg_controllen += cmsg_space(sizeof(char));
break;
#endif /* ifdef IP_TOS */
#ifdef IPV6_TCLASS
case IPV6_TCLASS:
memset(cmsgp, 0, cmsg_space(sizeof(dscp)));
cmsgp->cmsg_level = level;
cmsgp->cmsg_type = type;
cmsgp->cmsg_len = cmsg_len(sizeof(dscp));
memmove(CMSG_DATA(cmsgp), &dscp, sizeof(dscp));
msg.msg_controllen += cmsg_space(sizeof(dscp));
break;
#endif /* ifdef IPV6_TCLASS */
default:
UNREACHABLE();
}
if (sendmsg(s, &msg, 0) < 0) {
switch (errno) {
#ifdef ENOPROTOOPT
case ENOPROTOOPT:
#endif /* ifdef ENOPROTOOPT */
#ifdef EOPNOTSUPP
case EOPNOTSUPP:
#endif /* ifdef EOPNOTSUPP */
case EINVAL:
case EPERM:
strerror_r(errno, strbuf, sizeof(strbuf));
isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(10),
"sendmsg: %s", strbuf);
break;
default:
UNEXPECTED_SYSERROR(
errno, "probing sendmsg() with %s=%02x failed",
(type == IP_TOS) ? "IP_TOS" : "IPV6_TCLASS",
dscp);
break;
}
return (false);
}
/*
* Make sure the message actually got sent.
*/
result = make_nonblock(s);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
iovec.iov_base = buf;
iovec.iov_len = sizeof(buf);
memset(&msg, 0, sizeof(msg));
msg.msg_name = (struct sockaddr *)&ss;
msg.msg_namelen = sizeof(ss);
msg.msg_iov = &iovec;
msg.msg_iovlen = 1;
msg.msg_control = NULL;
msg.msg_controllen = 0;
msg.msg_flags = 0;
if (recvmsg(s, &msg, 0) < 0) {
return (false);
}
return (true);
}
#endif /* if ISC_CMSG_IP_TOS || defined(IPV6_TCLASS) */
static void
try_dscp_v4(void) {
#ifdef IP_TOS
char strbuf[ISC_STRERRORSIZE];
struct addrinfo hints, *res0;
int s, dscp = 0, n;
#ifdef IP_RECVTOS
int on = 1;
#endif /* IP_RECVTOS */
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_DGRAM;
hints.ai_protocol = IPPROTO_UDP;
#ifdef AI_NUMERICHOST
hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
#else /* ifdef AI_NUMERICHOST */
hints.ai_flags = AI_PASSIVE;
#endif /* ifdef AI_NUMERICHOST */
n = getaddrinfo("127.0.0.1", NULL, &hints, &res0);
if (n != 0 || res0 == NULL) {
isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(10),
"getaddrinfo(127.0.0.1): %s", gai_strerror(n));
return;
}
s = socket(res0->ai_family, res0->ai_socktype, res0->ai_protocol);
if (s == -1) {
strerror_r(errno, strbuf, sizeof(strbuf));
isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(10),
"socket: %s", strbuf);
freeaddrinfo(res0);
return;
}
if (setsockopt(s, IPPROTO_IP, IP_TOS, &dscp, sizeof(dscp)) == 0) {
dscp_result |= ISC_NET_DSCPSETV4;
}
#ifdef IP_RECVTOS
on = 1;
if (setsockopt(s, IPPROTO_IP, IP_RECVTOS, &on, sizeof(on)) == 0) {
dscp_result |= ISC_NET_DSCPRECVV4;
}
#endif /* IP_RECVTOS */
#if ISC_CMSG_IP_TOS
if (cmsgsend(s, IPPROTO_IP, IP_TOS, res0)) {
dscp_result |= ISC_NET_DSCPPKTV4;
}
#endif /* ISC_CMSG_IP_TOS */
freeaddrinfo(res0);
close(s);
#endif /* IP_TOS */
}
static void
try_dscp_v6(void) {
#ifdef IPV6_TCLASS
char strbuf[ISC_STRERRORSIZE];
struct addrinfo hints, *res0;
int s, dscp = 0, n;
#if defined(IPV6_RECVTCLASS)
int on = 1;
#endif /* IPV6_RECVTCLASS */
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET6;
hints.ai_socktype = SOCK_DGRAM;
hints.ai_protocol = IPPROTO_UDP;
#ifdef AI_NUMERICHOST
hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
#else /* ifdef AI_NUMERICHOST */
hints.ai_flags = AI_PASSIVE;
#endif /* ifdef AI_NUMERICHOST */
n = getaddrinfo("::1", NULL, &hints, &res0);
if (n != 0 || res0 == NULL) {
isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(10),
"getaddrinfo(::1): %s", gai_strerror(n));
return;
}
s = socket(res0->ai_family, res0->ai_socktype, res0->ai_protocol);
if (s == -1) {
strerror_r(errno, strbuf, sizeof(strbuf));
isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(10),
"socket: %s", strbuf);
freeaddrinfo(res0);
return;
}
if (setsockopt(s, IPPROTO_IPV6, IPV6_TCLASS, &dscp, sizeof(dscp)) == 0)
{
dscp_result |= ISC_NET_DSCPSETV6;
}
#ifdef IPV6_RECVTCLASS
on = 1;
if (setsockopt(s, IPPROTO_IPV6, IPV6_RECVTCLASS, &on, sizeof(on)) == 0)
{
dscp_result |= ISC_NET_DSCPRECVV6;
}
#endif /* IPV6_RECVTCLASS */
if (cmsgsend(s, IPPROTO_IPV6, IPV6_TCLASS, res0)) {
dscp_result |= ISC_NET_DSCPPKTV6;
}
freeaddrinfo(res0);
close(s);
#endif /* IPV6_TCLASS */
}
static void
try_dscp(void) {
try_dscp_v4();
try_dscp_v6();
}
static void
initialize_dscp(void) {
RUNTIME_CHECK(isc_once_do(&once_dscp, try_dscp) == ISC_R_SUCCESS);
}
unsigned int
isc_net_probedscp(void) {
initialize_dscp();
return (dscp_result);
}
#if defined(USE_SYSCTL_PORTRANGE)
#if defined(HAVE_SYSCTLBYNAME)
static isc_result_t

View File

@ -130,13 +130,6 @@ static const isc_statscounter_t unixstatsindex[] = {
static thread_local int isc__nm_tid_v = ISC_NETMGR_TID_UNKNOWN;
/*
* Set by the -T dscp option on the command line. If set to a value
* other than -1, we check to make sure DSCP values match it, and
* assert if not. (Not currently in use.)
*/
int isc_dscp_check_value = -1;
static void
nmsocket_maybe_destroy(isc_nmsocket_t *sock FLARG);
static void

View File

@ -406,20 +406,6 @@ cfg_obj_assockaddr(const cfg_obj_t *obj);
* if necessary.
*/
isc_dscp_t
cfg_obj_getdscp(const cfg_obj_t *obj);
/*%<
* Returns the DSCP value of a configuration object representing a
* socket address.
*
* Requires:
* \li 'obj' points to a valid configuration object of a
* socket address type.
*
* Returns:
* \li DSCP value associated with a sockaddr, or -1.
*/
bool
cfg_obj_isnetprefix(const cfg_obj_t *obj);
/*%<

View File

@ -179,7 +179,7 @@ struct cfg_obj {
isc_sockaddr_t sockaddr;
struct {
isc_sockaddr_t sockaddr;
isc_dscp_t dscp;
int32_t dscp;
} sockaddrdscp;
cfg_netprefix_t netprefix;
isccfg_duration_t duration;
@ -374,9 +374,6 @@ cfg_lookingat_netaddr(cfg_parser_t *pctx, unsigned int flags);
isc_result_t
cfg_parse_rawport(cfg_parser_t *pctx, unsigned int flags, in_port_t *port);
isc_result_t
cfg_parse_dscp(cfg_parser_t *pctx, isc_dscp_t *dscp);
isc_result_t
cfg_parse_sockaddr(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);

View File

@ -161,7 +161,8 @@ static cfg_type_t cfg_type_tkey_dhkey = { "tkey-dhkey", cfg_parse_tuple,
static cfg_tuplefielddef_t listenon_tuple_fields[] = {
{ "port", &cfg_type_optional_port, 0 },
{ "dscp", &cfg_type_uint32, 0 },
{ "dscp", &cfg_type_uint32,
CFG_CLAUSEFLAG_OBSOLETE | CFG_CLAUSEFLAG_NODOC },
{ "tls", &cfg_type_astring, 0 },
#if HAVE_LIBNGHTTP2
{ "http", &cfg_type_astring, 0 },
@ -233,7 +234,7 @@ static cfg_type_t cfg_type_acl = { "acl", cfg_parse_tuple,
static cfg_tuplefielddef_t remotes_fields[] = {
{ "name", &cfg_type_astring, 0 },
{ "port", &cfg_type_optional_port, 0 },
{ "dscp", &cfg_type_optional_dscp, 0 },
{ "dscp", &cfg_type_optional_dscp, CFG_CLAUSEFLAG_OBSOLETE },
{ "addresses", &cfg_type_bracketed_namesockaddrkeylist, 0 },
{ NULL, NULL, 0 }
};
@ -272,7 +273,7 @@ static cfg_type_t cfg_type_bracketed_namesockaddrkeylist = {
static cfg_tuplefielddef_t namesockaddrkeylist_fields[] = {
{ "port", &cfg_type_optional_port, 0 },
{ "dscp", &cfg_type_optional_dscp, 0 },
{ "dscp", &cfg_type_optional_dscp, CFG_CLAUSEFLAG_OBSOLETE },
{ "addresses", &cfg_type_bracketed_namesockaddrkeylist, 0 },
{ NULL, NULL, 0 }
};
@ -287,7 +288,7 @@ static cfg_type_t cfg_type_namesockaddrkeylist = {
*/
static cfg_tuplefielddef_t portiplist_fields[] = {
{ "port", &cfg_type_optional_port, 0 },
{ "dscp", &cfg_type_optional_dscp, 0 },
{ "dscp", &cfg_type_optional_dscp, CFG_CLAUSEFLAG_OBSOLETE },
{ "addresses", &cfg_type_bracketed_dscpsockaddrlist, 0 },
{ NULL, NULL, 0 }
};
@ -790,7 +791,7 @@ static keyword_type_t dscp_kw = { "dscp", &cfg_type_uint32 };
static cfg_type_t cfg_type_optional_dscp = {
"optional_dscp", parse_optional_keyvalue, print_keyvalue,
doc_optional_keyvalue, &cfg_rep_uint32, &dscp_kw
cfg_doc_void, &cfg_rep_uint32, &dscp_kw
};
static keyword_type_t port_kw = { "port", &cfg_type_uint32 };
@ -1234,7 +1235,7 @@ static cfg_clausedef_t options_clauses[] = {
{ "dnstap-version", &cfg_type_qstringornone,
CFG_CLAUSEFLAG_NOTCONFIGURED },
#endif /* ifdef HAVE_DNSTAP */
{ "dscp", &cfg_type_uint32, 0 },
{ "dscp", &cfg_type_uint32, CFG_CLAUSEFLAG_OBSOLETE },
{ "dump-file", &cfg_type_qstring, 0 },
{ "fake-iquery", NULL, CFG_CLAUSEFLAG_ANCIENT },
{ "files", &cfg_type_size, CFG_CLAUSEFLAG_DEPRECATED },
@ -3166,11 +3167,11 @@ parse_querysource(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
cfg_obj_t *obj = NULL;
isc_netaddr_t netaddr;
in_port_t port = 0;
isc_dscp_t dscp = -1;
unsigned int have_address = 0;
unsigned int have_port = 0;
unsigned int have_dscp = 0;
const unsigned int *flagp = type->of;
int dscp = -1;
if ((*flagp & CFG_ADDR_V4OK) != 0) {
isc_netaddr_any(&netaddr);
@ -3199,8 +3200,13 @@ parse_querysource(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
} else if (strcasecmp(TOKEN_STRING(pctx), "dscp") == 0)
{
/* read "dscp" */
cfg_parser_warning(pctx, 0,
"'dscp' is obsolete and "
"should be removed");
CHECK(cfg_gettoken(pctx, 0));
CHECK(cfg_parse_dscp(pctx, &dscp));
CHECK(cfg_parse_uint32(pctx, NULL, &obj));
dscp = cfg_obj_asuint32(obj);
cfg_obj_destroy(pctx, &obj);
have_dscp++;
} else if (have_port == 0 && have_dscp == 0 &&
have_address == 0)
@ -3208,8 +3214,8 @@ parse_querysource(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
return (cfg_parse_sockaddr(pctx, type, ret));
} else {
cfg_parser_error(pctx, CFG_LOG_NEAR,
"expected 'address', 'port', "
"or 'dscp'");
"expected 'address' "
"or 'port'");
return (ISC_R_UNEXPECTEDTOKEN);
}
} else {
@ -3274,8 +3280,7 @@ doc_querysource(cfg_printer_t *pctx, const cfg_type_t *type) {
} else {
UNREACHABLE();
}
cfg_print_cstr(pctx, " | * ) ] port ( <integer> | * ) ) )"
" [ dscp <integer> ]");
cfg_print_cstr(pctx, " | * ) ] port ( <integer> | * ) ) )");
}
static unsigned int sockaddr4wild_flags = CFG_ADDR_WILDOK | CFG_ADDR_V4OK |
@ -3556,7 +3561,7 @@ static cfg_type_t cfg_type_logfile = { "log_file", parse_logfile,
print_logfile, doc_logfile,
&cfg_rep_tuple, logfile_fields };
/*% An IPv4 address with optional dscp and port, "*" accepted as wildcard. */
/*% An IPv4 address with optional port, "*" accepted as wildcard. */
static cfg_type_t cfg_type_sockaddr4wild = {
"sockaddr4wild", cfg_parse_sockaddr, cfg_print_sockaddr,
cfg_doc_sockaddr, &cfg_rep_sockaddr, &sockaddr4wild_flags
@ -3641,7 +3646,7 @@ cfg_type_t cfg_type_sessionkey = { "sessionkey", cfg_parse_mapbody,
static cfg_tuplefielddef_t nameport_fields[] = {
{ "name", &cfg_type_astring, 0 },
{ "port", &cfg_type_optional_port, 0 },
{ "dscp", &cfg_type_optional_dscp, 0 },
{ "dscp", &cfg_type_optional_dscp, CFG_CLAUSEFLAG_OBSOLETE },
{ NULL, NULL, 0 }
};
@ -3656,20 +3661,14 @@ doc_sockaddrnameport(cfg_printer_t *pctx, const cfg_type_t *type) {
cfg_print_cstr(pctx, "<quoted_string>");
cfg_print_cstr(pctx, " ");
cfg_print_cstr(pctx, "[ port <integer> ]");
cfg_print_cstr(pctx, " ");
cfg_print_cstr(pctx, "[ dscp <integer> ]");
cfg_print_cstr(pctx, " | ");
cfg_print_cstr(pctx, "<ipv4_address>");
cfg_print_cstr(pctx, " ");
cfg_print_cstr(pctx, "[ port <integer> ]");
cfg_print_cstr(pctx, " ");
cfg_print_cstr(pctx, "[ dscp <integer> ]");
cfg_print_cstr(pctx, " | ");
cfg_print_cstr(pctx, "<ipv6_address>");
cfg_print_cstr(pctx, " ");
cfg_print_cstr(pctx, "[ port <integer> ]");
cfg_print_cstr(pctx, " ");
cfg_print_cstr(pctx, "[ dscp <integer> ]");
cfg_print_cstr(pctx, " )");
}

Some files were not shown because too many files have changed in this diff Show More