diff --git a/bin/dig/dig.c b/bin/dig/dig.c index 93f224a101..9ff8b4292c 100644 --- a/bin/dig/dig.c +++ b/bin/dig/dig.c @@ -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; diff --git a/bin/dig/dig.rst b/bin/dig/dig.rst index d81ea3d51c..59ac9f15dd 100644 --- a/bin/dig/dig.rst +++ b/bin/dig/dig.rst @@ -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 diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index f52cdd6d71..1f9d430bf6 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -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) diff --git a/bin/dig/dighost.h b/bin/dig/dighost.h index a09485328d..593468a049 100644 --- a/bin/dig/dighost.h +++ b/bin/dig/dighost.h @@ -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; diff --git a/bin/named/config.c b/bin/named/config.c index 0dcc814c25..86bade216e 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -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 { diff --git a/bin/named/include/named/config.h b/bin/named/include/named/config.h index 834c53f6e7..d9c5aa3c32 100644 --- a/bin/named/include/named/config.h +++ b/bin/named/include/named/config.h @@ -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); diff --git a/bin/named/include/named/globals.h b/bin/named/include/named/globals.h index 5467d28736..c65e93343c 100644 --- a/bin/named/include/named/globals.h +++ b/bin/named/include/named/globals.h @@ -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); diff --git a/bin/named/main.c b/bin/named/main.c index 107151f506..ee85556f66 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -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")) { diff --git a/bin/named/server.c b/bin/named/server.c index a18395550e..d7b5273d9c 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -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; } diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index 2068edc273..a94c3fa42b 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -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) { diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index bde0b239ac..ae443a20dc 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -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:"); diff --git a/bin/tests/system/Makefile.am b/bin/tests/system/Makefile.am index 3daff8b316..b26bcf0bed 100644 --- a/bin/tests/system/Makefile.am +++ b/bin/tests/system/Makefile.am @@ -108,7 +108,6 @@ TESTS += \ dialup \ dlzexternal \ dns64 \ - dscp \ dsdigest \ dupsigs \ dyndb \ diff --git a/bin/tests/system/checkconf/range.conf b/bin/tests/system/checkconf/range.conf index 8fb8f028b1..c254f5c998 100644 --- a/bin/tests/system/checkconf/range.conf +++ b/bin/tests/system/checkconf/range.conf @@ -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"; }; diff --git a/bin/tests/system/conf.sh.common b/bin/tests/system/conf.sh.common index c7ea867f83..5474332ca5 100644 --- a/bin/tests/system/conf.sh.common +++ b/bin/tests/system/conf.sh.common @@ -68,7 +68,6 @@ database digdelv dlz dns64 -dscp dsdigest ecdsa eddsa diff --git a/bin/tests/system/cookie/ns1/named.conf.in b/bin/tests/system/cookie/ns1/named.conf.in index 130430326f..025f8d0bb2 100644 --- a/bin/tests/system/cookie/ns1/named.conf.in +++ b/bin/tests/system/cookie/ns1/named.conf.in @@ -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; }; diff --git a/bin/tests/system/cookie/ns2/named.conf.in b/bin/tests/system/cookie/ns2/named.conf.in index ef081251b4..cd74d8adca 100644 --- a/bin/tests/system/cookie/ns2/named.conf.in +++ b/bin/tests/system/cookie/ns2/named.conf.in @@ -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; }; diff --git a/bin/tests/system/cookie/ns3/named.conf.in b/bin/tests/system/cookie/ns3/named.conf.in index 0382474549..090d528ba3 100644 --- a/bin/tests/system/cookie/ns3/named.conf.in +++ b/bin/tests/system/cookie/ns3/named.conf.in @@ -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; }; diff --git a/bin/tests/system/cookie/ns7/named.conf.in b/bin/tests/system/cookie/ns7/named.conf.in index c9518ae051..eba565705b 100644 --- a/bin/tests/system/cookie/ns7/named.conf.in +++ b/bin/tests/system/cookie/ns7/named.conf.in @@ -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; }; diff --git a/bin/tests/system/digdelv/ns3/named.conf.in b/bin/tests/system/digdelv/ns3/named.conf.in index a13747baf7..66bb74891f 100644 --- a/bin/tests/system/digdelv/ns3/named.conf.in +++ b/bin/tests/system/digdelv/ns3/named.conf.in @@ -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; }; diff --git a/bin/tests/system/digdelv/tests.sh b/bin/tests/system/digdelv/tests.sh index c630ae1e8a..3debad3da8 100644 --- a/bin/tests/system/digdelv/tests.sh +++ b/bin/tests/system/digdelv/tests.sh @@ -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 diff --git a/bin/tests/system/dnssec/ns4/named1.conf.in b/bin/tests/system/dnssec/ns4/named1.conf.in index 09a32921f1..280217e50b 100644 --- a/bin/tests/system/dnssec/ns4/named1.conf.in +++ b/bin/tests/system/dnssec/ns4/named1.conf.in @@ -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; }; diff --git a/bin/tests/system/dnssec/ns4/named2.conf.in b/bin/tests/system/dnssec/ns4/named2.conf.in index 5742871a4f..b01979bb52 100644 --- a/bin/tests/system/dnssec/ns4/named2.conf.in +++ b/bin/tests/system/dnssec/ns4/named2.conf.in @@ -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; }; diff --git a/bin/tests/system/dscp/clean.sh b/bin/tests/system/dscp/clean.sh deleted file mode 100644 index e52f7b6fce..0000000000 --- a/bin/tests/system/dscp/clean.sh +++ /dev/null @@ -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* diff --git a/bin/tests/system/dscp/ns1/named.args b/bin/tests/system/dscp/ns1/named.args deleted file mode 100644 index 2a3e86a26d..0000000000 --- a/bin/tests/system/dscp/ns1/named.args +++ /dev/null @@ -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 diff --git a/bin/tests/system/dscp/ns1/named.conf.in b/bin/tests/system/dscp/ns1/named.conf.in deleted file mode 100644 index e5c79715df..0000000000 --- a/bin/tests/system/dscp/ns1/named.conf.in +++ /dev/null @@ -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"; -}; diff --git a/bin/tests/system/dscp/ns1/root.db b/bin/tests/system/dscp/ns1/root.db deleted file mode 100644 index 9d473e2545..0000000000 --- a/bin/tests/system/dscp/ns1/root.db +++ /dev/null @@ -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 diff --git a/bin/tests/system/dscp/ns2/named.args b/bin/tests/system/dscp/ns2/named.args deleted file mode 100644 index 7122b39537..0000000000 --- a/bin/tests/system/dscp/ns2/named.args +++ /dev/null @@ -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 diff --git a/bin/tests/system/dscp/ns2/named.conf.in b/bin/tests/system/dscp/ns2/named.conf.in deleted file mode 100644 index ca835c864a..0000000000 --- a/bin/tests/system/dscp/ns2/named.conf.in +++ /dev/null @@ -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; }; -}; diff --git a/bin/tests/system/dscp/ns3/hint.db b/bin/tests/system/dscp/ns3/hint.db deleted file mode 100644 index 875a407c80..0000000000 --- a/bin/tests/system/dscp/ns3/hint.db +++ /dev/null @@ -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 diff --git a/bin/tests/system/dscp/ns3/named.args b/bin/tests/system/dscp/ns3/named.args deleted file mode 100644 index 60ae7f4f91..0000000000 --- a/bin/tests/system/dscp/ns3/named.args +++ /dev/null @@ -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 diff --git a/bin/tests/system/dscp/ns3/named.conf.in b/bin/tests/system/dscp/ns3/named.conf.in deleted file mode 100644 index 38d4985391..0000000000 --- a/bin/tests/system/dscp/ns3/named.conf.in +++ /dev/null @@ -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"; -}; diff --git a/bin/tests/system/dscp/ns4/named.args b/bin/tests/system/dscp/ns4/named.args deleted file mode 100644 index 8352455c09..0000000000 --- a/bin/tests/system/dscp/ns4/named.args +++ /dev/null @@ -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 diff --git a/bin/tests/system/dscp/ns4/named.conf.in b/bin/tests/system/dscp/ns4/named.conf.in deleted file mode 100644 index 8c8ca4fd11..0000000000 --- a/bin/tests/system/dscp/ns4/named.conf.in +++ /dev/null @@ -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"; -}; diff --git a/bin/tests/system/dscp/ns4/root.db b/bin/tests/system/dscp/ns4/root.db deleted file mode 100644 index cb3b395458..0000000000 --- a/bin/tests/system/dscp/ns4/root.db +++ /dev/null @@ -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 diff --git a/bin/tests/system/dscp/ns5/named.args b/bin/tests/system/dscp/ns5/named.args deleted file mode 100644 index 4f0c842128..0000000000 --- a/bin/tests/system/dscp/ns5/named.args +++ /dev/null @@ -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 diff --git a/bin/tests/system/dscp/ns5/named.conf.in b/bin/tests/system/dscp/ns5/named.conf.in deleted file mode 100644 index 2d1db3c714..0000000000 --- a/bin/tests/system/dscp/ns5/named.conf.in +++ /dev/null @@ -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; }; -}; diff --git a/bin/tests/system/dscp/ns6/hint.db b/bin/tests/system/dscp/ns6/hint.db deleted file mode 100644 index c2c51f2c02..0000000000 --- a/bin/tests/system/dscp/ns6/hint.db +++ /dev/null @@ -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 diff --git a/bin/tests/system/dscp/ns6/named.args b/bin/tests/system/dscp/ns6/named.args deleted file mode 100644 index a5a278df09..0000000000 --- a/bin/tests/system/dscp/ns6/named.args +++ /dev/null @@ -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 diff --git a/bin/tests/system/dscp/ns6/named.conf.in b/bin/tests/system/dscp/ns6/named.conf.in deleted file mode 100644 index 94c1b599ce..0000000000 --- a/bin/tests/system/dscp/ns6/named.conf.in +++ /dev/null @@ -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"; -}; diff --git a/bin/tests/system/dscp/ns7/named.args b/bin/tests/system/dscp/ns7/named.args deleted file mode 100644 index 733a65e4f7..0000000000 --- a/bin/tests/system/dscp/ns7/named.args +++ /dev/null @@ -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 diff --git a/bin/tests/system/dscp/ns7/named.conf.in b/bin/tests/system/dscp/ns7/named.conf.in deleted file mode 100644 index cbf7096ce9..0000000000 --- a/bin/tests/system/dscp/ns7/named.conf.in +++ /dev/null @@ -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; }; -}; diff --git a/bin/tests/system/dscp/setup.sh b/bin/tests/system/dscp/setup.sh deleted file mode 100644 index 6e3e0ad963..0000000000 --- a/bin/tests/system/dscp/setup.sh +++ /dev/null @@ -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 diff --git a/bin/tests/system/dscp/tests.sh b/bin/tests/system/dscp/tests.sh deleted file mode 100644 index 4b1f923db1..0000000000 --- a/bin/tests/system/dscp/tests.sh +++ /dev/null @@ -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 diff --git a/bin/tests/system/emptyzones/ns1/named1.conf.in b/bin/tests/system/emptyzones/ns1/named1.conf.in index 582b4fa636..4275df44ce 100644 --- a/bin/tests/system/emptyzones/ns1/named1.conf.in +++ b/bin/tests/system/emptyzones/ns1/named1.conf.in @@ -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; }; diff --git a/bin/tests/system/emptyzones/ns1/named2.conf.in b/bin/tests/system/emptyzones/ns1/named2.conf.in index 8d8f0ff1c7..e330e336be 100644 --- a/bin/tests/system/emptyzones/ns1/named2.conf.in +++ b/bin/tests/system/emptyzones/ns1/named2.conf.in @@ -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; }; diff --git a/bin/tests/system/nsupdate/ns1/named.conf.in b/bin/tests/system/nsupdate/ns1/named.conf.in index 2b67360c76..fef5beb1f0 100644 --- a/bin/tests/system/nsupdate/ns1/named.conf.in +++ b/bin/tests/system/nsupdate/ns1/named.conf.in @@ -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"; diff --git a/bin/tests/system/nsupdate/ns2/named.conf.in b/bin/tests/system/nsupdate/ns2/named.conf.in index c85eef52c9..43137febbb 100644 --- a/bin/tests/system/nsupdate/ns2/named.conf.in +++ b/bin/tests/system/nsupdate/ns2/named.conf.in @@ -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; }; diff --git a/bin/tests/system/nsupdate/ns3/named.conf.in b/bin/tests/system/nsupdate/ns3/named.conf.in index f87048a9b4..0cfa1db216 100644 --- a/bin/tests/system/nsupdate/ns3/named.conf.in +++ b/bin/tests/system/nsupdate/ns3/named.conf.in @@ -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; }; diff --git a/bin/tests/system/pipelined/pipequeries.c b/bin/tests/system/pipelined/pipequeries.c index 67994b5a46..7419d22b0e 100644 --- a/bin/tests/system/pipelined/pipequeries.c +++ b/bin/tests/system/pipelined/pipequeries.c @@ -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); diff --git a/bin/tests/system/resolver/ns1/named.conf.in b/bin/tests/system/resolver/ns1/named.conf.in index 7ca1cafd38..f0f9571209 100644 --- a/bin/tests/system/resolver/ns1/named.conf.in +++ b/bin/tests/system/resolver/ns1/named.conf.in @@ -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; }; diff --git a/bin/tests/system/resolver/ns4/named.conf.in b/bin/tests/system/resolver/ns4/named.conf.in index 6a44110b04..281c2ca0c8 100644 --- a/bin/tests/system/resolver/ns4/named.conf.in +++ b/bin/tests/system/resolver/ns4/named.conf.in @@ -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; }; diff --git a/bin/tests/system/resolver/ns5/named.conf.in b/bin/tests/system/resolver/ns5/named.conf.in index c6344ad198..6ad4e6aaaf 100644 --- a/bin/tests/system/resolver/ns5/named.conf.in +++ b/bin/tests/system/resolver/ns5/named.conf.in @@ -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; }; diff --git a/bin/tests/system/resolver/ns6/named.conf.in b/bin/tests/system/resolver/ns6/named.conf.in index 2ebcdd7c91..769b577069 100644 --- a/bin/tests/system/resolver/ns6/named.conf.in +++ b/bin/tests/system/resolver/ns6/named.conf.in @@ -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; }; diff --git a/bin/tests/system/resolver/ns7/named1.conf.in b/bin/tests/system/resolver/ns7/named1.conf.in index 5bb8c803bf..1d32ae9745 100644 --- a/bin/tests/system/resolver/ns7/named1.conf.in +++ b/bin/tests/system/resolver/ns7/named1.conf.in @@ -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; }; diff --git a/bin/tests/system/resolver/ns7/named2.conf.in b/bin/tests/system/resolver/ns7/named2.conf.in index 5bb8c803bf..1d32ae9745 100644 --- a/bin/tests/system/resolver/ns7/named2.conf.in +++ b/bin/tests/system/resolver/ns7/named2.conf.in @@ -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; }; diff --git a/bin/tests/system/tkey/keycreate.c b/bin/tests/system/tkey/keycreate.c index 3b9c3a451f..37f6e48cb6 100644 --- a/bin/tests/system/tkey/keycreate.c +++ b/bin/tests/system/tkey/keycreate.c @@ -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); diff --git a/bin/tests/system/tkey/keydelete.c b/bin/tests/system/tkey/keydelete.c index 100ed8461e..f653a183df 100644 --- a/bin/tests/system/tkey/keydelete.c +++ b/bin/tests/system/tkey/keydelete.c @@ -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); diff --git a/bin/tools/mdig.c b/bin/tools/mdig.c index 7474e885e7..ae3fd862e5 100644 --- a/bin/tools/mdig.c +++ b/bin/tools/mdig.c @@ -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; diff --git a/bin/tools/mdig.rst b/bin/tools/mdig.rst index 27d34f3164..33948d1475 100644 --- a/bin/tools/mdig.rst +++ b/bin/tools/mdig.rst @@ -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 diff --git a/doc/arm/reference.rst b/doc/arm/reference.rst index ade41a956a..c9c2cefb43 100644 --- a/doc/arm/reference.rst +++ b/doc/arm/reference.rst @@ -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. diff --git a/doc/design/dscp b/doc/design/dscp deleted file mode 100644 index 25afeca496..0000000000 --- a/doc/design/dscp +++ /dev/null @@ -1,143 +0,0 @@ - - - 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 ; -udp-dscp ; - -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. diff --git a/doc/man/dig.1in b/doc/man/dig.1in index a659764283..6d4079353c 100644 --- a/doc/man/dig.1in +++ b/doc/man/dig.1in @@ -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 diff --git a/doc/man/mdig.1in b/doc/man/mdig.1in index 4208b5641f..4365a496e6 100644 --- a/doc/man/mdig.1in +++ b/doc/man/mdig.1in @@ -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 diff --git a/doc/man/named.conf.5in b/doc/man/named.conf.5in index 50194c3110..97f970acdf 100644 --- a/doc/man/named.conf.5in +++ b/doc/man/named.conf.5in @@ -126,9 +126,9 @@ options { allow\-transfer [ port ] [ transport ] { ; ... }; allow\-update { ; ... }; allow\-update\-forwarding { ; ... }; - also\-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; - alt\-transfer\-source ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated - alt\-transfer\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated + also\-notify [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + alt\-transfer\-source ( | * ) [ port ( | * ) ]; // deprecated + alt\-transfer\-source\-v6 ( | * ) [ port ( | * ) ]; // deprecated answer\-cookie ; attach\-cache ; auth\-nxdomain ; @@ -138,7 +138,7 @@ options { avoid\-v6\-udp\-ports { ; ... }; bindkeys\-file ; blackhole { ; ... }; - catalog\-zones { zone [ default\-primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... } ] [ zone\-directory ] [ in\-memory ] [ min\-update\-interval ]; ... }; + catalog\-zones { zone [ default\-primaries [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... } ] [ zone\-directory ] [ in\-memory ] [ min\-update\-interval ]; ... }; check\-dup\-records ( fail | warn | ignore ); check\-integrity ; check\-mx ( fail | warn | ignore ); @@ -185,8 +185,8 @@ options { dnstap\-identity ( | none | hostname ); // not configured dnstap\-output ( file | unix ) [ size ( unlimited | ) ] [ versions ( unlimited | ) ] [ suffix ( increment | timestamp ) ]; // not configured dnstap\-version ( | none ); // not configured - dscp ; - dual\-stack\-servers [ port ] { ( [ port ] [ dscp ] | [ port ] [ dscp ] | [ port ] [ dscp ] ); ... }; + dscp ; // obsolete + dual\-stack\-servers [ port ] { ( [ port ] | [ port ] | [ port ] ); ... }; dump\-file ; edns\-udp\-size ; empty\-contact ; @@ -198,7 +198,7 @@ options { files ( default | unlimited | ); // deprecated flush\-zones\-on\-shutdown ; forward ( first | only ); - forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; + forwarders [ port ] { ( | ) [ port ]; ... }; fstrm\-set\-buffer\-hint ; // not configured fstrm\-set\-flush\-timeout ; // not configured fstrm\-set\-input\-queue\-size ; // not configured @@ -222,8 +222,8 @@ options { keep\-response\-order { ; ... }; key\-directory ; lame\-ttl ; - listen\-on [ port ] [ dscp ] [ tls ] [ http ] { ; ... }; // may occur multiple times - listen\-on\-v6 [ port ] [ dscp ] [ tls ] [ http ] { ; ... }; // may occur multiple times + listen\-on [ port ] [ tls ] [ http ] { ; ... }; // may occur multiple times + listen\-on\-v6 [ port ] [ tls ] [ http ] { ; ... }; // may occur multiple times lmdb\-mapsize ; lock\-file ( | none ); managed\-keys\-directory ; @@ -265,23 +265,23 @@ options { notify ( explicit | master\-only | primary\-only | ); notify\-delay ; notify\-rate ; - notify\-source ( | * ) [ port ( | * ) ] [ dscp ]; - notify\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + notify\-source ( | * ) [ port ( | * ) ]; + notify\-source\-v6 ( | * ) [ port ( | * ) ]; notify\-to\-soa ; nsec3\-test\-zone ; // test only nta\-lifetime ; nta\-recheck ; nxdomain\-redirect ; - parental\-source ( | * ) [ port ( | * ) ] [ dscp ]; - parental\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + parental\-source ( | * ) [ port ( | * ) ]; + parental\-source\-v6 ( | * ) [ port ( | * ) ]; pid\-file ( | none ); port ; preferred\-glue ; prefetch [ ]; provide\-ixfr ; qname\-minimization ( strict | relaxed | disabled | off ); - query\-source ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ) [ dscp ]; - query\-source\-v6 ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ) [ dscp ]; + query\-source ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ); + query\-source\-v6 ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ); querylog ; random\-device ( | none ); // obsolete rate\-limit { @@ -357,8 +357,8 @@ options { tls\-port ; transfer\-format ( many\-answers | one\-answer ); transfer\-message\-size ; - transfer\-source ( | * ) [ port ( | * ) ] [ dscp ]; - transfer\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + transfer\-source ( | * ) [ port ( | * ) ]; + transfer\-source\-v6 ( | * ) [ port ( | * ) ]; transfers\-in ; transfers\-out ; transfers\-per\-ns ; @@ -378,11 +378,11 @@ options { zone\-statistics ( full | terse | none | ); }; -parental\-agents [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; // may occur multiple times +parental\-agents [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; // may occur multiple times plugin ( query ) [ { } ]; // may occur multiple times -primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; // may occur multiple times +primaries [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; // may occur multiple times server { bogus ; @@ -391,12 +391,12 @@ server { edns\-version ; keys ; max\-udp\-size ; - notify\-source ( | * ) [ port ( | * ) ] [ dscp ]; - notify\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + notify\-source ( | * ) [ port ( | * ) ]; + notify\-source\-v6 ( | * ) [ port ( | * ) ]; padding ; provide\-ixfr ; - query\-source ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ) [ dscp ]; - query\-source\-v6 ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ) [ dscp ]; + query\-source ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ); + query\-source\-v6 ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ); request\-expire ; request\-ixfr ; request\-nsid ; @@ -404,8 +404,8 @@ server { tcp\-keepalive ; tcp\-only ; transfer\-format ( many\-answers | one\-answer ); - transfer\-source ( | * ) [ port ( | * ) ] [ dscp ]; - transfer\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + transfer\-source ( | * ) [ port ( | * ) ]; + transfer\-source\-v6 ( | * ) [ port ( | * ) ]; transfers ; }; // may occur multiple times @@ -441,13 +441,13 @@ view [ ] { allow\-transfer [ port ] [ transport ] { ; ... }; allow\-update { ; ... }; allow\-update\-forwarding { ; ... }; - also\-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; - alt\-transfer\-source ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated - alt\-transfer\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated + also\-notify [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + alt\-transfer\-source ( | * ) [ port ( | * ) ]; // deprecated + alt\-transfer\-source\-v6 ( | * ) [ port ( | * ) ]; // deprecated attach\-cache ; auth\-nxdomain ; auto\-dnssec ( allow | maintain | off ); // deprecated - catalog\-zones { zone [ default\-primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... } ] [ zone\-directory ] [ in\-memory ] [ min\-update\-interval ]; ... }; + catalog\-zones { zone [ default\-primaries [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... } ] [ zone\-directory ] [ in\-memory ] [ min\-update\-interval ]; ... }; check\-dup\-records ( fail | warn | ignore ); check\-integrity ; check\-mx ( fail | warn | ignore ); @@ -490,7 +490,7 @@ view [ ] { 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 ] { ( [ port ] [ dscp ] | [ port ] [ dscp ] | [ port ] [ dscp ] ); ... }; + dual\-stack\-servers [ port ] { ( [ port ] | [ port ] | [ port ] ); ... }; dyndb { }; // may occur multiple times edns\-udp\-size ; empty\-contact ; @@ -500,7 +500,7 @@ view [ ] { fetches\-per\-server [ ( drop | fail ) ]; fetches\-per\-zone [ ( drop | fail ) ]; forward ( first | only ); - forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; + forwarders [ port ] { ( | ) [ port ]; ... }; glue\-cache ; // deprecated ipv4only\-contact ; ipv4only\-enable ; @@ -550,22 +550,22 @@ view [ ] { nocookie\-udp\-size ; notify ( explicit | master\-only | primary\-only | ); notify\-delay ; - notify\-source ( | * ) [ port ( | * ) ] [ dscp ]; - notify\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + notify\-source ( | * ) [ port ( | * ) ]; + notify\-source\-v6 ( | * ) [ port ( | * ) ]; notify\-to\-soa ; nsec3\-test\-zone ; // test only nta\-lifetime ; nta\-recheck ; nxdomain\-redirect ; - parental\-source ( | * ) [ port ( | * ) ] [ dscp ]; - parental\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + parental\-source ( | * ) [ port ( | * ) ]; + parental\-source\-v6 ( | * ) [ port ( | * ) ]; plugin ( query ) [ { } ]; // may occur multiple times preferred\-glue ; prefetch [ ]; provide\-ixfr ; qname\-minimization ( strict | relaxed | disabled | off ); - query\-source ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ) [ dscp ]; - query\-source\-v6 ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ) [ dscp ]; + query\-source ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ); + query\-source\-v6 ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ); rate\-limit { all\-per\-second ; errors\-per\-second ; @@ -605,12 +605,12 @@ view [ ] { edns\-version ; keys ; max\-udp\-size ; - notify\-source ( | * ) [ port ( | * ) ] [ dscp ]; - notify\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + notify\-source ( | * ) [ port ( | * ) ]; + notify\-source\-v6 ( | * ) [ port ( | * ) ]; padding ; provide\-ixfr ; - query\-source ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ) [ dscp ]; - query\-source\-v6 ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ) [ dscp ]; + query\-source ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ); + query\-source\-v6 ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ); request\-expire ; request\-ixfr ; request\-nsid ; @@ -618,8 +618,8 @@ view [ ] { tcp\-keepalive ; tcp\-only ; transfer\-format ( many\-answers | one\-answer ); - transfer\-source ( | * ) [ port ( | * ) ] [ dscp ]; - transfer\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + transfer\-source ( | * ) [ port ( | * ) ]; + transfer\-source\-v6 ( | * ) [ port ( | * ) ]; transfers ; }; // may occur multiple times servfail\-ttl ; @@ -636,8 +636,8 @@ view [ ] { suppress\-initial\-notify ; // obsolete synth\-from\-dnssec ; transfer\-format ( many\-answers | one\-answer ); - transfer\-source ( | * ) [ port ( | * ) ] [ dscp ]; - transfer\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + transfer\-source ( | * ) [ port ( | * ) ]; + transfer\-source\-v6 ( | * ) [ port ( | * ) ]; trust\-anchor\-telemetry ; // experimental trust\-anchors { ( static\-key | initial\-key | static\-ds | initial\-ds ) ; ... }; // may occur multiple times trusted\-keys { ; ... }; // may occur multiple times, deprecated @@ -669,9 +669,9 @@ zone [ ] { allow\-query\-on { ; ... }; allow\-transfer [ port ] [ transport ] { ; ... }; allow\-update { ; ... }; - also\-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; - alt\-transfer\-source ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated - alt\-transfer\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated + also\-notify [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + alt\-transfer\-source ( | * ) [ port ( | * ) ]; // deprecated + alt\-transfer\-source\-v6 ( | * ) [ port ( | * ) ]; // deprecated auto\-dnssec ( allow | maintain | off ); // deprecated check\-dup\-records ( fail | warn | ignore ); check\-integrity ; @@ -693,7 +693,7 @@ zone [ ] { dnssec\-update\-mode ( maintain | no\-resign ); file ; forward ( first | only ); - forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; + forwarders [ port ] { ( | ) [ port ]; ... }; inline\-signing ; ixfr\-from\-differences ; journal ; @@ -708,13 +708,13 @@ zone [ ] { max\-zone\-ttl ( unlimited | ); notify ( explicit | master\-only | primary\-only | ); notify\-delay ; - notify\-source ( | * ) [ port ( | * ) ] [ dscp ]; - notify\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + notify\-source ( | * ) [ port ( | * ) ]; + notify\-source\-v6 ( | * ) [ port ( | * ) ]; notify\-to\-soa ; nsec3\-test\-zone ; // test only - parental\-agents [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; - parental\-source ( | * ) [ port ( | * ) ] [ dscp ]; - parental\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + parental\-agents [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + parental\-source ( | * ) [ port ( | * ) ]; + parental\-source\-v6 ( | * ) [ port ( | * ) ]; serial\-update\-method ( date | increment | unixtime ); sig\-signing\-nodes ; sig\-signing\-signatures ; @@ -742,9 +742,9 @@ zone [ ] { allow\-query\-on { ; ... }; allow\-transfer [ port ] [ transport ] { ; ... }; allow\-update\-forwarding { ; ... }; - also\-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; - alt\-transfer\-source ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated - alt\-transfer\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated + also\-notify [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + alt\-transfer\-source ( | * ) [ port ( | * ) ]; // deprecated + alt\-transfer\-source\-v6 ( | * ) [ port ( | * ) ]; // deprecated auto\-dnssec ( allow | maintain | off ); // deprecated check\-names ( fail | warn | ignore ); database ; @@ -757,7 +757,7 @@ zone [ ] { dnssec\-update\-mode ( maintain | no\-resign ); file ; forward ( first | only ); - forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; + forwarders [ port ] { ( | ) [ port ]; ... }; inline\-signing ; ixfr\-from\-differences ; journal ; @@ -778,22 +778,22 @@ zone [ ] { multi\-master ; notify ( explicit | master\-only | primary\-only | ); notify\-delay ; - notify\-source ( | * ) [ port ( | * ) ] [ dscp ]; - notify\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + notify\-source ( | * ) [ port ( | * ) ]; + notify\-source\-v6 ( | * ) [ port ( | * ) ]; notify\-to\-soa ; nsec3\-test\-zone ; // test only - parental\-agents [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; - parental\-source ( | * ) [ port ( | * ) ] [ dscp ]; - parental\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; - primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + parental\-agents [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + parental\-source ( | * ) [ port ( | * ) ]; + parental\-source\-v6 ( | * ) [ port ( | * ) ]; + primaries [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; request\-expire ; request\-ixfr ; sig\-signing\-nodes ; sig\-signing\-signatures ; sig\-signing\-type ; sig\-validity\-interval [ ]; - transfer\-source ( | * ) [ port ( | * ) ] [ dscp ]; - transfer\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + transfer\-source ( | * ) [ port ( | * ) ]; + transfer\-source\-v6 ( | * ) [ port ( | * ) ]; try\-tcp\-refresh ; update\-check\-ksk ; use\-alt\-transfer\-source ; // deprecated @@ -817,9 +817,9 @@ zone [ ] { allow\-query\-on { ; ... }; allow\-transfer [ port ] [ transport ] { ; ... }; allow\-update\-forwarding { ; ... }; - also\-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; - alt\-transfer\-source ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated - alt\-transfer\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated + also\-notify [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + alt\-transfer\-source ( | * ) [ port ( | * ) ]; // deprecated + alt\-transfer\-source\-v6 ( | * ) [ port ( | * ) ]; // deprecated check\-names ( fail | warn | ignore ); database ; file ; @@ -841,13 +841,13 @@ zone [ ] { multi\-master ; notify ( explicit | master\-only | primary\-only | ); notify\-delay ; - notify\-source ( | * ) [ port ( | * ) ] [ dscp ]; - notify\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; - primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + notify\-source ( | * ) [ port ( | * ) ]; + notify\-source\-v6 ( | * ) [ port ( | * ) ]; + primaries [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; request\-expire ; request\-ixfr ; - transfer\-source ( | * ) [ port ( | * ) ] [ dscp ]; - transfer\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + transfer\-source ( | * ) [ port ( | * ) ]; + transfer\-source\-v6 ( | * ) [ port ( | * ) ]; try\-tcp\-refresh ; use\-alt\-transfer\-source ; // deprecated zero\-no\-soa\-ttl ; @@ -867,7 +867,7 @@ zone [ ] { type forward; delegation\-only ; forward ( first | only ); - forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; + forwarders [ port ] { ( | ) [ port ]; ... }; }; .ft P @@ -905,7 +905,7 @@ zone [ ] { masterfile\-style ( full | relative ); max\-records ; max\-zone\-ttl ( unlimited | ); - primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + primaries [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; zone\-statistics ( full | terse | none | ); }; @@ -923,7 +923,7 @@ zone [ ] { allow\-query { ; ... }; allow\-query\-on { ; ... }; forward ( first | only ); - forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; + forwarders [ port ] { ( | ) [ port ]; ... }; max\-records ; server\-addresses { ( | ); ... }; server\-names { ; ... }; @@ -949,7 +949,7 @@ zone [ ] { dialup ( notify | notify\-passive | passive | refresh | ); file ; forward ( first | only ); - forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; + forwarders [ port ] { ( | ) [ port ]; ... }; masterfile\-format ( raw | text ); masterfile\-style ( full | relative ); max\-records ; @@ -960,9 +960,9 @@ zone [ ] { min\-refresh\-time ; min\-retry\-time ; multi\-master ; - primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; - transfer\-source ( | * ) [ port ( | * ) ] [ dscp ]; - transfer\-source\-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + primaries [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + transfer\-source ( | * ) [ port ( | * ) ]; + transfer\-source\-v6 ( | * ) [ port ( | * ) ]; use\-alt\-transfer\-source ; // deprecated zone\-statistics ( full | terse | none | ); }; diff --git a/doc/misc/forward.zoneopt b/doc/misc/forward.zoneopt index e694813a86..148b74c584 100644 --- a/doc/misc/forward.zoneopt +++ b/doc/misc/forward.zoneopt @@ -2,5 +2,5 @@ zone [ ] { type forward; delegation-only ; forward ( first | only ); - forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; + forwarders [ port ] { ( | ) [ port ]; ... }; }; diff --git a/doc/misc/mirror.zoneopt b/doc/misc/mirror.zoneopt index 90a0b97a59..a7fc7fa66e 100644 --- a/doc/misc/mirror.zoneopt +++ b/doc/misc/mirror.zoneopt @@ -5,9 +5,9 @@ zone [ ] { allow-query-on { ; ... }; allow-transfer [ port ] [ transport ] { ; ... }; allow-update-forwarding { ; ... }; - also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; - alt-transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated - alt-transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated + also-notify [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + alt-transfer-source ( | * ) [ port ( | * ) ]; // deprecated + alt-transfer-source-v6 ( | * ) [ port ( | * ) ]; // deprecated check-names ( fail | warn | ignore ); database ; file ; @@ -29,13 +29,13 @@ zone [ ] { multi-master ; notify ( explicit | master-only | primary-only | ); notify-delay ; - notify-source ( | * ) [ port ( | * ) ] [ dscp ]; - notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; - primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + notify-source ( | * ) [ port ( | * ) ]; + notify-source-v6 ( | * ) [ port ( | * ) ]; + primaries [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; request-expire ; request-ixfr ; - transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; - transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + transfer-source ( | * ) [ port ( | * ) ]; + transfer-source-v6 ( | * ) [ port ( | * ) ]; try-tcp-refresh ; use-alt-transfer-source ; // deprecated zero-no-soa-ttl ; diff --git a/doc/misc/options b/doc/misc/options index fdd59edb72..a15ba67a69 100644 --- a/doc/misc/options +++ b/doc/misc/options @@ -69,9 +69,9 @@ options { allow-transfer [ port ] [ transport ] { ; ... }; allow-update { ; ... }; allow-update-forwarding { ; ... }; - also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; - alt-transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated - alt-transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated + also-notify [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + alt-transfer-source ( | * ) [ port ( | * ) ]; // deprecated + alt-transfer-source-v6 ( | * ) [ port ( | * ) ]; // deprecated answer-cookie ; attach-cache ; auth-nxdomain ; @@ -81,7 +81,7 @@ options { avoid-v6-udp-ports { ; ... }; bindkeys-file ; blackhole { ; ... }; - catalog-zones { zone [ default-primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... } ] [ zone-directory ] [ in-memory ] [ min-update-interval ]; ... }; + catalog-zones { zone [ default-primaries [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... } ] [ zone-directory ] [ in-memory ] [ min-update-interval ]; ... }; check-dup-records ( fail | warn | ignore ); check-integrity ; check-mx ( fail | warn | ignore ); @@ -128,8 +128,8 @@ options { dnstap-identity ( | none | hostname ); // not configured dnstap-output ( file | unix ) [ size ( unlimited | ) ] [ versions ( unlimited | ) ] [ suffix ( increment | timestamp ) ]; // not configured dnstap-version ( | none ); // not configured - dscp ; - dual-stack-servers [ port ] { ( [ port ] [ dscp ] | [ port ] [ dscp ] | [ port ] [ dscp ] ); ... }; + dscp ; // obsolete + dual-stack-servers [ port ] { ( [ port ] | [ port ] | [ port ] ); ... }; dump-file ; edns-udp-size ; empty-contact ; @@ -141,7 +141,7 @@ options { files ( default | unlimited | ); // deprecated flush-zones-on-shutdown ; forward ( first | only ); - forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; + forwarders [ port ] { ( | ) [ port ]; ... }; fstrm-set-buffer-hint ; // not configured fstrm-set-flush-timeout ; // not configured fstrm-set-input-queue-size ; // not configured @@ -165,8 +165,8 @@ options { keep-response-order { ; ... }; key-directory ; lame-ttl ; - listen-on [ port ] [ dscp ] [ tls ] [ http ] { ; ... }; // may occur multiple times - listen-on-v6 [ port ] [ dscp ] [ tls ] [ http ] { ; ... }; // may occur multiple times + listen-on [ port ] [ tls ] [ http ] { ; ... }; // may occur multiple times + listen-on-v6 [ port ] [ tls ] [ http ] { ; ... }; // may occur multiple times lmdb-mapsize ; lock-file ( | none ); managed-keys-directory ; @@ -208,23 +208,23 @@ options { notify ( explicit | master-only | primary-only | ); notify-delay ; notify-rate ; - notify-source ( | * ) [ port ( | * ) ] [ dscp ]; - notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + notify-source ( | * ) [ port ( | * ) ]; + notify-source-v6 ( | * ) [ port ( | * ) ]; notify-to-soa ; nsec3-test-zone ; // test only nta-lifetime ; nta-recheck ; nxdomain-redirect ; - parental-source ( | * ) [ port ( | * ) ] [ dscp ]; - parental-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + parental-source ( | * ) [ port ( | * ) ]; + parental-source-v6 ( | * ) [ port ( | * ) ]; pid-file ( | none ); port ; preferred-glue ; prefetch [ ]; provide-ixfr ; qname-minimization ( strict | relaxed | disabled | off ); - query-source ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ) [ dscp ]; - query-source-v6 ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ) [ dscp ]; + query-source ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ); + query-source-v6 ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ); querylog ; random-device ( | none ); // obsolete rate-limit { @@ -300,8 +300,8 @@ options { tls-port ; transfer-format ( many-answers | one-answer ); transfer-message-size ; - transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; - transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + transfer-source ( | * ) [ port ( | * ) ]; + transfer-source-v6 ( | * ) [ port ( | * ) ]; transfers-in ; transfers-out ; transfers-per-ns ; @@ -321,11 +321,11 @@ options { zone-statistics ( full | terse | none | ); }; -parental-agents [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; // may occur multiple times +parental-agents [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; // may occur multiple times plugin ( query ) [ { } ]; // may occur multiple times -primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; // may occur multiple times +primaries [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; // may occur multiple times server { bogus ; @@ -334,12 +334,12 @@ server { edns-version ; keys ; max-udp-size ; - notify-source ( | * ) [ port ( | * ) ] [ dscp ]; - notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + notify-source ( | * ) [ port ( | * ) ]; + notify-source-v6 ( | * ) [ port ( | * ) ]; padding ; provide-ixfr ; - query-source ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ) [ dscp ]; - query-source-v6 ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ) [ dscp ]; + query-source ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ); + query-source-v6 ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ); request-expire ; request-ixfr ; request-nsid ; @@ -347,8 +347,8 @@ server { tcp-keepalive ; tcp-only ; transfer-format ( many-answers | one-answer ); - transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; - transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + transfer-source ( | * ) [ port ( | * ) ]; + transfer-source-v6 ( | * ) [ port ( | * ) ]; transfers ; }; // may occur multiple times @@ -384,13 +384,13 @@ view [ ] { allow-transfer [ port ] [ transport ] { ; ... }; allow-update { ; ... }; allow-update-forwarding { ; ... }; - also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; - alt-transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated - alt-transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated + also-notify [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + alt-transfer-source ( | * ) [ port ( | * ) ]; // deprecated + alt-transfer-source-v6 ( | * ) [ port ( | * ) ]; // deprecated attach-cache ; auth-nxdomain ; auto-dnssec ( allow | maintain | off ); // deprecated - catalog-zones { zone [ default-primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... } ] [ zone-directory ] [ in-memory ] [ min-update-interval ]; ... }; + catalog-zones { zone [ default-primaries [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... } ] [ zone-directory ] [ in-memory ] [ min-update-interval ]; ... }; check-dup-records ( fail | warn | ignore ); check-integrity ; check-mx ( fail | warn | ignore ); @@ -433,7 +433,7 @@ view [ ] { 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 ] { ( [ port ] [ dscp ] | [ port ] [ dscp ] | [ port ] [ dscp ] ); ... }; + dual-stack-servers [ port ] { ( [ port ] | [ port ] | [ port ] ); ... }; dyndb { }; // may occur multiple times edns-udp-size ; empty-contact ; @@ -443,7 +443,7 @@ view [ ] { fetches-per-server [ ( drop | fail ) ]; fetches-per-zone [ ( drop | fail ) ]; forward ( first | only ); - forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; + forwarders [ port ] { ( | ) [ port ]; ... }; glue-cache ; // deprecated ipv4only-contact ; ipv4only-enable ; @@ -493,22 +493,22 @@ view [ ] { nocookie-udp-size ; notify ( explicit | master-only | primary-only | ); notify-delay ; - notify-source ( | * ) [ port ( | * ) ] [ dscp ]; - notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + notify-source ( | * ) [ port ( | * ) ]; + notify-source-v6 ( | * ) [ port ( | * ) ]; notify-to-soa ; nsec3-test-zone ; // test only nta-lifetime ; nta-recheck ; nxdomain-redirect ; - parental-source ( | * ) [ port ( | * ) ] [ dscp ]; - parental-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + parental-source ( | * ) [ port ( | * ) ]; + parental-source-v6 ( | * ) [ port ( | * ) ]; plugin ( query ) [ { } ]; // may occur multiple times preferred-glue ; prefetch [ ]; provide-ixfr ; qname-minimization ( strict | relaxed | disabled | off ); - query-source ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ) [ dscp ]; - query-source-v6 ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ) [ dscp ]; + query-source ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ); + query-source-v6 ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ); rate-limit { all-per-second ; errors-per-second ; @@ -548,12 +548,12 @@ view [ ] { edns-version ; keys ; max-udp-size ; - notify-source ( | * ) [ port ( | * ) ] [ dscp ]; - notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + notify-source ( | * ) [ port ( | * ) ]; + notify-source-v6 ( | * ) [ port ( | * ) ]; padding ; provide-ixfr ; - query-source ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ) [ dscp ]; - query-source-v6 ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ) [ dscp ]; + query-source ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ); + query-source-v6 ( ( [ address ] ( | * ) [ port ( | * ) ] ) | ( [ [ address ] ( | * ) ] port ( | * ) ) ); request-expire ; request-ixfr ; request-nsid ; @@ -561,8 +561,8 @@ view [ ] { tcp-keepalive ; tcp-only ; transfer-format ( many-answers | one-answer ); - transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; - transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + transfer-source ( | * ) [ port ( | * ) ]; + transfer-source-v6 ( | * ) [ port ( | * ) ]; transfers ; }; // may occur multiple times servfail-ttl ; @@ -579,8 +579,8 @@ view [ ] { suppress-initial-notify ; // obsolete synth-from-dnssec ; transfer-format ( many-answers | one-answer ); - transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; - transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + transfer-source ( | * ) [ port ( | * ) ]; + transfer-source-v6 ( | * ) [ port ( | * ) ]; trust-anchor-telemetry ; // experimental trust-anchors { ( static-key | initial-key | static-ds | initial-ds ) ; ... }; // may occur multiple times trusted-keys { ; ... }; // may occur multiple times, deprecated diff --git a/doc/misc/primary.zoneopt b/doc/misc/primary.zoneopt index 16a0333032..007a903dd0 100644 --- a/doc/misc/primary.zoneopt +++ b/doc/misc/primary.zoneopt @@ -4,9 +4,9 @@ zone [ ] { allow-query-on { ; ... }; allow-transfer [ port ] [ transport ] { ; ... }; allow-update { ; ... }; - also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; - alt-transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated - alt-transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated + also-notify [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + alt-transfer-source ( | * ) [ port ( | * ) ]; // deprecated + alt-transfer-source-v6 ( | * ) [ port ( | * ) ]; // deprecated auto-dnssec ( allow | maintain | off ); // deprecated check-dup-records ( fail | warn | ignore ); check-integrity ; @@ -28,7 +28,7 @@ zone [ ] { dnssec-update-mode ( maintain | no-resign ); file ; forward ( first | only ); - forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; + forwarders [ port ] { ( | ) [ port ]; ... }; inline-signing ; ixfr-from-differences ; journal ; @@ -43,13 +43,13 @@ zone [ ] { max-zone-ttl ( unlimited | ); notify ( explicit | master-only | primary-only | ); notify-delay ; - notify-source ( | * ) [ port ( | * ) ] [ dscp ]; - notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + notify-source ( | * ) [ port ( | * ) ]; + notify-source-v6 ( | * ) [ port ( | * ) ]; notify-to-soa ; nsec3-test-zone ; // test only - parental-agents [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; - parental-source ( | * ) [ port ( | * ) ] [ dscp ]; - parental-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + parental-agents [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + parental-source ( | * ) [ port ( | * ) ]; + parental-source-v6 ( | * ) [ port ( | * ) ]; serial-update-method ( date | increment | unixtime ); sig-signing-nodes ; sig-signing-signatures ; diff --git a/doc/misc/redirect.zoneopt b/doc/misc/redirect.zoneopt index 1c34bb11f1..bcd9a571ea 100644 --- a/doc/misc/redirect.zoneopt +++ b/doc/misc/redirect.zoneopt @@ -8,6 +8,6 @@ zone [ ] { masterfile-style ( full | relative ); max-records ; max-zone-ttl ( unlimited | ); - primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + primaries [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; zone-statistics ( full | terse | none | ); }; diff --git a/doc/misc/rndc.grammar b/doc/misc/rndc.grammar index 716a21d938..9d5604f98a 100644 --- a/doc/misc/rndc.grammar +++ b/doc/misc/rndc.grammar @@ -12,7 +12,7 @@ options { }; server { - addresses { ( [ port ] [ dscp ] | [ port ] [ dscp ] | [ port ] [ dscp ] ); ... }; + addresses { ( [ port ] | [ port ] | [ port ] ); ... }; key ; port ; source-address ( | * ); diff --git a/doc/misc/secondary.zoneopt b/doc/misc/secondary.zoneopt index 75c99e3973..bec0e9c5c9 100644 --- a/doc/misc/secondary.zoneopt +++ b/doc/misc/secondary.zoneopt @@ -5,9 +5,9 @@ zone [ ] { allow-query-on { ; ... }; allow-transfer [ port ] [ transport ] { ; ... }; allow-update-forwarding { ; ... }; - also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; - alt-transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated - alt-transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; // deprecated + also-notify [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + alt-transfer-source ( | * ) [ port ( | * ) ]; // deprecated + alt-transfer-source-v6 ( | * ) [ port ( | * ) ]; // deprecated auto-dnssec ( allow | maintain | off ); // deprecated check-names ( fail | warn | ignore ); database ; @@ -20,7 +20,7 @@ zone [ ] { dnssec-update-mode ( maintain | no-resign ); file ; forward ( first | only ); - forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; + forwarders [ port ] { ( | ) [ port ]; ... }; inline-signing ; ixfr-from-differences ; journal ; @@ -41,22 +41,22 @@ zone [ ] { multi-master ; notify ( explicit | master-only | primary-only | ); notify-delay ; - notify-source ( | * ) [ port ( | * ) ] [ dscp ]; - notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + notify-source ( | * ) [ port ( | * ) ]; + notify-source-v6 ( | * ) [ port ( | * ) ]; notify-to-soa ; nsec3-test-zone ; // test only - parental-agents [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; - parental-source ( | * ) [ port ( | * ) ] [ dscp ]; - parental-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; - primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + parental-agents [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + parental-source ( | * ) [ port ( | * ) ]; + parental-source-v6 ( | * ) [ port ( | * ) ]; + primaries [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; request-expire ; request-ixfr ; sig-signing-nodes ; sig-signing-signatures ; sig-signing-type ; sig-validity-interval [ ]; - transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; - transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + transfer-source ( | * ) [ port ( | * ) ]; + transfer-source-v6 ( | * ) [ port ( | * ) ]; try-tcp-refresh ; update-check-ksk ; use-alt-transfer-source ; // deprecated diff --git a/doc/misc/static-stub.zoneopt b/doc/misc/static-stub.zoneopt index f89d46248a..5357528e6f 100644 --- a/doc/misc/static-stub.zoneopt +++ b/doc/misc/static-stub.zoneopt @@ -3,7 +3,7 @@ zone [ ] { allow-query { ; ... }; allow-query-on { ; ... }; forward ( first | only ); - forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; + forwarders [ port ] { ( | ) [ port ]; ... }; max-records ; server-addresses { ( | ); ... }; server-names { ; ... }; diff --git a/doc/misc/stub.zoneopt b/doc/misc/stub.zoneopt index d5b0ba5144..2a6810f22c 100644 --- a/doc/misc/stub.zoneopt +++ b/doc/misc/stub.zoneopt @@ -8,7 +8,7 @@ zone [ ] { dialup ( notify | notify-passive | passive | refresh | ); file ; forward ( first | only ); - forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; + forwarders [ port ] { ( | ) [ port ]; ... }; masterfile-format ( raw | text ); masterfile-style ( full | relative ); max-records ; @@ -19,9 +19,9 @@ zone [ ] { min-refresh-time ; min-retry-time ; multi-master ; - primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; - transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; - transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + primaries [ port ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; + transfer-source ( | * ) [ port ( | * ) ]; + transfer-source-v6 ( | * ) [ port ( | * ) ]; use-alt-transfer-source ; // deprecated zone-statistics ( full | terse | none | ); }; diff --git a/lib/bind9/check.c b/lib/bind9/check.c index f51dd3d6b3..593a980e42 100644 --- a/lib/bind9/check.c +++ b/lib/bind9/check.c @@ -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) { diff --git a/lib/dns/adb.c b/lib/dns/adb.c index 8bd1855bf7..23cceaf896 100644 --- a/lib/dns/adb.c +++ b/lib/dns/adb.c @@ -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); diff --git a/lib/dns/catz.c b/lib/dns/catz.c index 0fb05f6221..5d2870ea89 100644 --- a/lib/dns/catz.c +++ b/lib/dns/catz.c @@ -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++) { /* diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c index 2026ddae21..7bcf2e840a 100644 --- a/lib/dns/dispatch.c +++ b/lib/dns/dispatch.c @@ -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: diff --git a/lib/dns/forward.c b/lib/dns/forward.c index 270dbd41ed..ea91fb25a9 100644 --- a/lib/dns/forward.c +++ b/lib/dns/forward.c @@ -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); } diff --git a/lib/dns/include/dns/adb.h b/lib/dns/include/dns/adb.h index 47fbaca024..6310a8ce89 100644 --- a/lib/dns/include/dns/adb.h +++ b/lib/dns/include/dns/adb.h @@ -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 */ diff --git a/lib/dns/include/dns/dispatch.h b/lib/dns/include/dns/dispatch.h index bcf5b97db4..96be0f4a92 100644 --- a/lib/dns/include/dns/dispatch.h +++ b/lib/dns/include/dns/dispatch.h @@ -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. diff --git a/lib/dns/include/dns/forward.h b/lib/dns/include/dns/forward.h index a821826704..f43fce789d 100644 --- a/lib/dns/include/dns/forward.h +++ b/lib/dns/include/dns/forward.h @@ -25,7 +25,6 @@ ISC_LANG_BEGINDECLS struct dns_forwarder { isc_sockaddr_t addr; - isc_dscp_t dscp; ISC_LINK(dns_forwarder_t) link; }; diff --git a/lib/dns/include/dns/ipkeylist.h b/lib/dns/include/dns/ipkeylist.h index 5a87cdb11a..50f229c9e2 100644 --- a/lib/dns/include/dns/ipkeylist.h +++ b/lib/dns/include/dns/ipkeylist.h @@ -20,12 +20,11 @@ #include /*% - * 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; diff --git a/lib/dns/include/dns/peer.h b/lib/dns/include/dns/peer.h index d4a7b12640..101e6f2e14 100644 --- a/lib/dns/include/dns/peer.h +++ b/lib/dns/include/dns/peer.h @@ -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); diff --git a/lib/dns/include/dns/request.h b/lib/dns/include/dns/request.h index 49d579fdc2..d00574f982 100644 --- a/lib/dns/include/dns/request.h +++ b/lib/dns/include/dns/request.h @@ -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. diff --git a/lib/dns/include/dns/resolver.h b/lib/dns/include/dns/resolver.h index c4eef93bac..bf4559f60f 100644 --- a/lib/dns/include/dns/resolver.h +++ b/lib/dns/include/dns/resolver.h @@ -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 diff --git a/lib/dns/include/dns/xfrin.h b/lib/dns/include/dns/xfrin.h index 7a8c41f22a..70b601bb57 100644 --- a/lib/dns/include/dns/xfrin.h +++ b/lib/dns/include/dns/xfrin.h @@ -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' diff --git a/lib/dns/include/dns/zone.h b/lib/dns/include/dns/zone.h index 9e41814c54..447e8aa1b2 100644 --- a/lib/dns/include/dns/zone.h +++ b/lib/dns/include/dns/zone.h @@ -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); /*%< diff --git a/lib/dns/ipkeylist.c b/lib/dns/ipkeylist.c index f773c1b616..431284b872 100644 --- a/lib/dns/ipkeylist.c +++ b/lib/dns/ipkeylist.c @@ -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 *)); diff --git a/lib/dns/peer.c b/lib/dns/peer.c index 2a722592ea..e4d2fcb9f2 100644 --- a/lib/dns/peer.c +++ b/lib/dns/peer.c @@ -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)); diff --git a/lib/dns/request.c b/lib/dns/request.c index e52039107a..e5066798f8 100644 --- a/lib/dns/request.c +++ b/lib/dns/request.c @@ -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; diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 0c737e40f5..880d33b4d3 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -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)); diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c index 0167421cd7..b35a3f53d3 100644 --- a/lib/dns/xfrin.c +++ b/lib/dns/xfrin.c @@ -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, diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 39e9ea59ad..c4814e4b1a 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -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, ¬ify->dst, dscp, options, key, + &src, ¬ify->dst, options, key, timeout * 3, timeout, 2, notify->zone->task, notify_done, notify, ¬ify->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", diff --git a/lib/isc/include/isc/net.h b/lib/isc/include/isc/net.h index 48a8bd5b6f..1a3ce63e05 100644 --- a/lib/isc/include/isc/net.h +++ b/lib/isc/include/isc/net.h @@ -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); /*%< diff --git a/lib/isc/include/isc/types.h b/lib/isc/include/isc/types.h index 5f3a19e161..185ff1c40a 100644 --- a/lib/isc/include/isc/types.h +++ b/lib/isc/include/isc/types.h @@ -41,13 +41,12 @@ 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 */ -typedef uint32_t isc_fsaccess_t; /*%< FS Access */ -typedef struct isc_hash isc_hash_t; /*%< Hash */ -typedef struct isc_httpd isc_httpd_t; /*%< HTTP client */ +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 */ +typedef uint32_t isc_fsaccess_t; /*%< FS Access */ +typedef struct isc_hash isc_hash_t; /*%< Hash */ +typedef struct isc_httpd isc_httpd_t; /*%< HTTP client */ typedef void(isc_httpdfree_t)(isc_buffer_t *, void *); /*%< HTTP free function */ typedef struct isc_httpdmgr isc_httpdmgr_t; /*%< HTTP manager */ diff --git a/lib/isc/net.c b/lib/isc/net.c index 4fdc87ee45..e32a543e2d 100644 --- a/lib/isc/net.c +++ b/lib/isc/net.c @@ -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 diff --git a/lib/isc/netmgr/netmgr.c b/lib/isc/netmgr/netmgr.c index fca577e6c9..301d5e10f8 100644 --- a/lib/isc/netmgr/netmgr.c +++ b/lib/isc/netmgr/netmgr.c @@ -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 diff --git a/lib/isccfg/include/isccfg/cfg.h b/lib/isccfg/include/isccfg/cfg.h index 105ec2cd48..c4f2d86362 100644 --- a/lib/isccfg/include/isccfg/cfg.h +++ b/lib/isccfg/include/isccfg/cfg.h @@ -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); /*%< diff --git a/lib/isccfg/include/isccfg/grammar.h b/lib/isccfg/include/isccfg/grammar.h index 01d31fc3f1..447ba71171 100644 --- a/lib/isccfg/include/isccfg/grammar.h +++ b/lib/isccfg/include/isccfg/grammar.h @@ -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); diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index a5c890bc00..5409a4ac49 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -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 } }; @@ -789,8 +790,8 @@ static cfg_type_t cfg_type_rrsetorder = { "rrsetorder", 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 + "optional_dscp", parse_optional_keyvalue, print_keyvalue, + 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 ( | * ) ) )" - " [ dscp ]"); + cfg_print_cstr(pctx, " | * ) ] port ( | * ) ) )"); } 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, ""); cfg_print_cstr(pctx, " "); cfg_print_cstr(pctx, "[ port ]"); - cfg_print_cstr(pctx, " "); - cfg_print_cstr(pctx, "[ dscp ]"); cfg_print_cstr(pctx, " | "); cfg_print_cstr(pctx, ""); cfg_print_cstr(pctx, " "); cfg_print_cstr(pctx, "[ port ]"); - cfg_print_cstr(pctx, " "); - cfg_print_cstr(pctx, "[ dscp ]"); cfg_print_cstr(pctx, " | "); cfg_print_cstr(pctx, ""); cfg_print_cstr(pctx, " "); cfg_print_cstr(pctx, "[ port ]"); - cfg_print_cstr(pctx, " "); - cfg_print_cstr(pctx, "[ dscp ]"); cfg_print_cstr(pctx, " )"); } diff --git a/lib/isccfg/parser.c b/lib/isccfg/parser.c index db9b99ea32..ad166954c2 100644 --- a/lib/isccfg/parser.c +++ b/lib/isccfg/parser.c @@ -3019,29 +3019,6 @@ cfg_print_rawaddr(cfg_printer_t *pctx, const isc_netaddr_t *na) { isc_buffer_usedlength(&buf)); } -isc_result_t -cfg_parse_dscp(cfg_parser_t *pctx, isc_dscp_t *dscp) { - isc_result_t result; - - REQUIRE(pctx != NULL); - REQUIRE(dscp != NULL); - - CHECK(cfg_gettoken(pctx, ISC_LEXOPT_NUMBER | ISC_LEXOPT_CNUMBER)); - - if (pctx->token.type != isc_tokentype_number) { - cfg_parser_error(pctx, CFG_LOG_NEAR, "expected number"); - return (ISC_R_UNEXPECTEDTOKEN); - } - if (pctx->token.value.as_ulong > 63U) { - cfg_parser_error(pctx, CFG_LOG_NEAR, "dscp out of range"); - return (ISC_R_RANGE); - } - *dscp = (isc_dscp_t)(pctx->token.value.as_ulong); - return (ISC_R_SUCCESS); -cleanup: - return (result); -} - /* netaddr */ static unsigned int netaddr_flags = CFG_ADDR_V4OK | CFG_ADDR_V6OK; @@ -3233,12 +3210,13 @@ parse_sockaddrsub(cfg_parser_t *pctx, const cfg_type_t *type, int flags, isc_result_t result; isc_netaddr_t netaddr; in_port_t port = 0; - isc_dscp_t dscp = -1; cfg_obj_t *obj = NULL; int have_port = 0, have_dscp = 0; + cfg_obj_t *dscp = NULL; CHECK(cfg_create_obj(pctx, type, &obj)); CHECK(cfg_parse_rawaddr(pctx, flags, &netaddr)); + obj->value.sockaddrdscp.dscp = -1; for (;;) { CHECK(cfg_peektoken(pctx, 0)); if (pctx->token.type == isc_tokentype_string) { @@ -3249,8 +3227,14 @@ parse_sockaddrsub(cfg_parser_t *pctx, const cfg_type_t *type, int flags, } else if ((flags & CFG_ADDR_DSCPOK) != 0 && strcasecmp(TOKEN_STRING(pctx), "dscp") == 0) { + cfg_parser_warning(pctx, 0, + "'dscp' is obsolete and " + "should be removed"); CHECK(cfg_gettoken(pctx, 0)); /* read "dscp" */ - CHECK(cfg_parse_dscp(pctx, &dscp)); + CHECK(cfg_parse_uint32(pctx, NULL, &dscp)); + obj->value.sockaddrdscp.dscp = + cfg_obj_asuint32(dscp); + cfg_obj_destroy(pctx, &dscp); ++have_dscp; } else { break; @@ -3271,7 +3255,6 @@ parse_sockaddrsub(cfg_parser_t *pctx, const cfg_type_t *type, int flags, goto cleanup; } isc_sockaddr_fromnetaddr(&obj->value.sockaddr, &netaddr, port); - obj->value.sockaddrdscp.dscp = dscp; *ret = obj; return (ISC_R_SUCCESS); @@ -3364,9 +3347,6 @@ cfg_doc_sockaddr(cfg_printer_t *pctx, const cfg_type_t *type) { } else { cfg_print_cstr(pctx, "[ port ]"); } - if ((*flagp & CFG_ADDR_DSCPOK) != 0) { - cfg_print_cstr(pctx, " [ dscp ]"); - } } bool @@ -3381,12 +3361,6 @@ cfg_obj_assockaddr(const cfg_obj_t *obj) { return (&obj->value.sockaddr); } -isc_dscp_t -cfg_obj_getdscp(const cfg_obj_t *obj) { - REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_sockaddr); - return (obj->value.sockaddrdscp.dscp); -} - isc_result_t cfg_gettoken(cfg_parser_t *pctx, int options) { isc_result_t result; diff --git a/lib/ns/include/ns/client.h b/lib/ns/include/ns/client.h index e937f0acec..f9d694fdd1 100644 --- a/lib/ns/include/ns/client.h +++ b/lib/ns/include/ns/client.h @@ -210,7 +210,6 @@ struct ns_client { dns_ecs_t ecs; /*%< EDNS client subnet sent by client */ struct in6_pktinfo pktinfo; - isc_dscp_t dscp; /*% * Information about recent FORMERR response(s), for * FORMERR loop avoidance. This is separate for each diff --git a/lib/ns/include/ns/interfacemgr.h b/lib/ns/include/ns/interfacemgr.h index 77cbbf64f4..028f86d570 100644 --- a/lib/ns/include/ns/interfacemgr.h +++ b/lib/ns/include/ns/interfacemgr.h @@ -80,7 +80,6 @@ struct ns_interface { isc_nmsocket_t *http_listensocket; isc_nmsocket_t *http_secure_listensocket; isc_quota_t *http_quota; - isc_dscp_t dscp; /*%< "listen-on" DSCP value */ isc_refcount_t ntcpaccepting; /*%< Number of clients * ready to accept new * TCP connections on this diff --git a/lib/ns/include/ns/listenlist.h b/lib/ns/include/ns/listenlist.h index cbb099c238..5d0a19b285 100644 --- a/lib/ns/include/ns/listenlist.h +++ b/lib/ns/include/ns/listenlist.h @@ -44,7 +44,6 @@ struct ns_listenelt { isc_mem_t *mctx; in_port_t port; bool is_http; - isc_dscp_t dscp; /* -1 = not set, 0..63 */ dns_acl_t *acl; isc_tlsctx_t *sslctx; isc_tlsctx_cache_t *sslctx_cache; @@ -80,8 +79,8 @@ typedef struct ns_listen_tls_params { ***/ isc_result_t -ns_listenelt_create(isc_mem_t *mctx, in_port_t port, isc_dscp_t dscp, - dns_acl_t *acl, const uint16_t family, bool tls, +ns_listenelt_create(isc_mem_t *mctx, in_port_t port, dns_acl_t *acl, + const uint16_t family, bool tls, const ns_listen_tls_params_t *tls_params, isc_tlsctx_cache_t *tlsctx_cache, ns_listenelt_t **target); /*%< @@ -94,8 +93,8 @@ ns_listenelt_create(isc_mem_t *mctx, in_port_t port, isc_dscp_t dscp, */ isc_result_t -ns_listenelt_create_http(isc_mem_t *mctx, in_port_t http_port, isc_dscp_t dscp, - dns_acl_t *acl, const uint16_t family, bool tls, +ns_listenelt_create_http(isc_mem_t *mctx, in_port_t http_port, dns_acl_t *acl, + const uint16_t family, bool tls, const ns_listen_tls_params_t *tls_params, isc_tlsctx_cache_t *tlsctx_cache, char **endpoints, size_t nendpoints, const uint32_t max_clients, @@ -129,9 +128,8 @@ ns_listenlist_detach(ns_listenlist_t **listp); */ isc_result_t -ns_listenlist_default(isc_mem_t *mctx, in_port_t port, isc_dscp_t dscp, - bool enabled, const uint16_t family, - ns_listenlist_t **target); +ns_listenlist_default(isc_mem_t *mctx, in_port_t port, bool enabled, + const uint16_t family, ns_listenlist_t **target); /*%< * Create a listen-on list with default contents, matching * all addresses with port 'port' (if 'enabled' is true), diff --git a/lib/ns/interfacemgr.c b/lib/ns/interfacemgr.c index be98841cea..50b87dfb5e 100644 --- a/lib/ns/interfacemgr.c +++ b/lib/ns/interfacemgr.c @@ -469,9 +469,7 @@ interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr, const char *name, REQUIRE(NS_INTERFACEMGR_VALID(mgr)); ifp = isc_mem_get(mgr->mctx, sizeof(*ifp)); - *ifp = (ns_interface_t){ .generation = mgr->generation, - .addr = *addr, - .dscp = -1 }; + *ifp = (ns_interface_t){ .generation = mgr->generation, .addr = *addr }; strlcpy(ifp->name, name, sizeof(ifp->name)); @@ -529,13 +527,6 @@ ns_interface_listentcp(ns_interface_t *ifp) { isc_result_totext(result)); } -#if 0 - if (ifp->dscp != -1) { - isc_socket_dscp(ifp->tcpsocket,ifp->dscp); - } - - (void)isc_socket_filter(ifp->tcpsocket,"dataready"); -#endif /* if 0 */ return (result); } @@ -683,7 +674,6 @@ interface_setup(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr, const char *name, REQUIRE(!LISTENING(ifp)); } - ifp->dscp = elt->dscp; ifp->flags |= NS_INTERFACEFLAG_LISTENING; if (elt->is_http) { @@ -1093,17 +1083,6 @@ do_scan(ns_interfacemgr_t *mgr, bool verbose, bool config) { ifp = find_matching_interface(mgr, &listen_addr); if (ifp != NULL) { ifp->generation = mgr->generation; - if (le->dscp != -1 && ifp->dscp == -1) { - ifp->dscp = le->dscp; - } else if (le->dscp != ifp->dscp) { - isc_sockaddr_format(&listen_addr, sabuf, - sizeof(sabuf)); - isc_log_write(IFMGR_COMMON_LOGARGS, - ISC_LOG_WARNING, - "%s: conflicting DSCP " - "values, using %d", - sabuf, ifp->dscp); - } if (LISTENING(ifp)) { if (config) { update_listener_configuration( @@ -1255,18 +1234,6 @@ do_scan(ns_interfacemgr_t *mgr, bool verbose, bool config) { ifp = find_matching_interface(mgr, &listen_sockaddr); if (ifp != NULL) { ifp->generation = mgr->generation; - if (le->dscp != -1 && ifp->dscp == -1) { - ifp->dscp = le->dscp; - } else if (le->dscp != ifp->dscp) { - isc_sockaddr_format(&listen_sockaddr, - sabuf, - sizeof(sabuf)); - isc_log_write(IFMGR_COMMON_LOGARGS, - ISC_LOG_WARNING, - "%s: conflicting DSCP " - "values, using %d", - sabuf, ifp->dscp); - } if (LISTENING(ifp)) { if (config) { update_listener_configuration( diff --git a/lib/ns/listenlist.c b/lib/ns/listenlist.c index d864ca97f1..c0f9e5946a 100644 --- a/lib/ns/listenlist.c +++ b/lib/ns/listenlist.c @@ -27,9 +27,9 @@ static void destroy(ns_listenlist_t *list); static isc_result_t -listenelt_create(isc_mem_t *mctx, in_port_t port, isc_dscp_t dscp, - dns_acl_t *acl, const uint16_t family, const bool is_http, - bool tls, const ns_listen_tls_params_t *tls_params, +listenelt_create(isc_mem_t *mctx, in_port_t port, dns_acl_t *acl, + const uint16_t family, const bool is_http, bool tls, + const ns_listen_tls_params_t *tls_params, isc_tlsctx_cache_t *tlsctx_cache, ns_listenelt_t **target) { ns_listenelt_t *elt = NULL; isc_result_t result = ISC_R_SUCCESS; @@ -174,7 +174,6 @@ listenelt_create(isc_mem_t *mctx, in_port_t port, isc_dscp_t dscp, ISC_LINK_INIT(elt, link); elt->port = port; elt->is_http = false; - elt->dscp = dscp; elt->acl = acl; elt->sslctx = sslctx; elt->sslctx_cache = NULL; @@ -200,17 +199,17 @@ tls_error: } isc_result_t -ns_listenelt_create(isc_mem_t *mctx, in_port_t port, isc_dscp_t dscp, - dns_acl_t *acl, const uint16_t family, bool tls, +ns_listenelt_create(isc_mem_t *mctx, in_port_t port, dns_acl_t *acl, + const uint16_t family, bool tls, const ns_listen_tls_params_t *tls_params, isc_tlsctx_cache_t *tlsctx_cache, ns_listenelt_t **target) { - return listenelt_create(mctx, port, dscp, acl, family, false, tls, - tls_params, tlsctx_cache, target); + return listenelt_create(mctx, port, acl, family, false, tls, tls_params, + tlsctx_cache, target); } isc_result_t -ns_listenelt_create_http(isc_mem_t *mctx, in_port_t http_port, isc_dscp_t dscp, - dns_acl_t *acl, const uint16_t family, bool tls, +ns_listenelt_create_http(isc_mem_t *mctx, in_port_t http_port, dns_acl_t *acl, + const uint16_t family, bool tls, const ns_listen_tls_params_t *tls_params, isc_tlsctx_cache_t *tlsctx_cache, char **endpoints, size_t nendpoints, const uint32_t max_clients, @@ -221,7 +220,7 @@ ns_listenelt_create_http(isc_mem_t *mctx, in_port_t http_port, isc_dscp_t dscp, REQUIRE(endpoints != NULL && *endpoints != NULL); REQUIRE(nendpoints > 0); - result = listenelt_create(mctx, http_port, dscp, acl, family, true, tls, + result = listenelt_create(mctx, http_port, acl, family, true, tls, tls_params, tlsctx_cache, target); if (result == ISC_R_SUCCESS) { (*target)->is_http = true; @@ -309,9 +308,8 @@ ns_listenlist_detach(ns_listenlist_t **listp) { } isc_result_t -ns_listenlist_default(isc_mem_t *mctx, in_port_t port, isc_dscp_t dscp, - bool enabled, const uint16_t family, - ns_listenlist_t **target) { +ns_listenlist_default(isc_mem_t *mctx, in_port_t port, bool enabled, + const uint16_t family, ns_listenlist_t **target) { isc_result_t result; dns_acl_t *acl = NULL; ns_listenelt_t *elt = NULL; @@ -327,8 +325,8 @@ ns_listenlist_default(isc_mem_t *mctx, in_port_t port, isc_dscp_t dscp, goto cleanup; } - result = ns_listenelt_create(mctx, port, dscp, acl, family, false, NULL, - NULL, &elt); + result = ns_listenelt_create(mctx, port, acl, family, false, NULL, NULL, + &elt); if (result != ISC_R_SUCCESS) { goto cleanup_acl; } diff --git a/tests/dns/Makefile.am b/tests/dns/Makefile.am index 25f593b3b3..d37caa5662 100644 --- a/tests/dns/Makefile.am +++ b/tests/dns/Makefile.am @@ -29,7 +29,6 @@ check_PROGRAMS = \ name_test \ nsec3_test \ nsec3param_test \ - peer_test \ private_test \ rbt_test \ rbtdb_test \ diff --git a/tests/dns/dispatch_test.c b/tests/dns/dispatch_test.c index d7de0386d5..c101744c7b 100644 --- a/tests/dns/dispatch_test.c +++ b/tests/dns/dispatch_test.c @@ -383,7 +383,7 @@ connected(isc_result_t eresult, isc_region_t *region, void *cbarg) { UNUSED(eresult); UNUSED(region); - dns_dispatch_send(dispentry, r, -1); + dns_dispatch_send(dispentry, r); } static void @@ -421,7 +421,7 @@ ISC_RUN_TEST_IMPL(dispatch_timeout_tcp_connect) { assert_int_equal(result, ISC_R_SUCCESS); result = dns_dispatch_createtcp(dispatchmgr, &tcp_connect_addr, - &tcp_server_addr, -1, &dispatch); + &tcp_server_addr, &dispatch); assert_int_equal(result, ISC_R_SUCCESS); region.base = rbuf; @@ -477,7 +477,7 @@ ISC_RUN_TEST_IMPL(dispatch_timeout_tcp_response) { assert_int_equal(result, ISC_R_SUCCESS); result = dns_dispatch_createtcp(dispatchmgr, &tcp_connect_addr, - &tcp_server_addr, -1, &dispatch); + &tcp_server_addr, &dispatch); assert_int_equal(result, ISC_R_SUCCESS); result = isc_nm_listentcpdns(netmgr, &tcp_server_addr, noop_nameserver, @@ -532,7 +532,7 @@ ISC_RUN_TEST_IMPL(dispatch_tcp_response) { assert_int_equal(result, ISC_R_SUCCESS); result = dns_dispatch_createtcp(dispatchmgr, &tcp_connect_addr, - &tcp_server_addr, -1, &dispatch); + &tcp_server_addr, &dispatch); assert_int_equal(result, ISC_R_SUCCESS); result = isc_nm_listentcpdns(netmgr, &tcp_server_addr, nameserver, NULL, diff --git a/tests/dns/peer_test.c b/tests/dns/peer_test.c deleted file mode 100644 index 32ef932d93..0000000000 --- a/tests/dns/peer_test.c +++ /dev/null @@ -1,136 +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. - */ - -#include /* IWYU pragma: keep */ -#include -#include -#include -#include -#include -#include - -#define UNIT_TESTING -#include - -#include - -#include - -#include - -/* Test DSCP set/get functions */ -ISC_RUN_TEST_IMPL(dscp) { - isc_result_t result; - isc_netaddr_t netaddr; - struct in_addr ina; - dns_peer_t *peer = NULL; - isc_dscp_t dscp; - - /* - * Create peer structure for the loopback address. - */ - ina.s_addr = INADDR_LOOPBACK; - isc_netaddr_fromin(&netaddr, &ina); - result = dns_peer_new(mctx, &netaddr, &peer); - assert_int_equal(result, ISC_R_SUCCESS); - - /* - * All should be not set on creation. - * 'dscp' should remain unchanged. - */ - dscp = 100; - result = dns_peer_getquerydscp(peer, &dscp); - assert_int_equal(result, ISC_R_NOTFOUND); - assert_int_equal(dscp, 100); - - result = dns_peer_getnotifydscp(peer, &dscp); - assert_int_equal(result, ISC_R_NOTFOUND); - assert_int_equal(dscp, 100); - - result = dns_peer_gettransferdscp(peer, &dscp); - assert_int_equal(result, ISC_R_NOTFOUND); - assert_int_equal(dscp, 100); - - /* - * Test that setting query dscp does not affect the other - * dscp values. 'dscp' should remain unchanged until - * dns_peer_getquerydscp is called. - */ - dscp = 100; - result = dns_peer_setquerydscp(peer, 1); - assert_int_equal(result, ISC_R_SUCCESS); - - result = dns_peer_getnotifydscp(peer, &dscp); - assert_int_equal(result, ISC_R_NOTFOUND); - assert_int_equal(dscp, 100); - - result = dns_peer_gettransferdscp(peer, &dscp); - assert_int_equal(result, ISC_R_NOTFOUND); - assert_int_equal(dscp, 100); - - result = dns_peer_getquerydscp(peer, &dscp); - assert_int_equal(result, ISC_R_SUCCESS); - assert_int_equal(dscp, 1); - - /* - * Test that setting notify dscp does not affect the other - * dscp values. 'dscp' should remain unchanged until - * dns_peer_getquerydscp is called then should change again - * on dns_peer_getnotifydscp. - */ - dscp = 100; - result = dns_peer_setnotifydscp(peer, 2); - assert_int_equal(result, ISC_R_SUCCESS); - - result = dns_peer_gettransferdscp(peer, &dscp); - assert_int_equal(result, ISC_R_NOTFOUND); - assert_int_equal(dscp, 100); - - result = dns_peer_getquerydscp(peer, &dscp); - assert_int_equal(result, ISC_R_SUCCESS); - assert_int_equal(dscp, 1); - - result = dns_peer_getnotifydscp(peer, &dscp); - assert_int_equal(result, ISC_R_SUCCESS); - assert_int_equal(dscp, 2); - - /* - * Test that setting notify dscp does not affect the other - * dscp values. Check that appropriate values are returned. - */ - dscp = 100; - result = dns_peer_settransferdscp(peer, 3); - assert_int_equal(result, ISC_R_SUCCESS); - - result = dns_peer_getquerydscp(peer, &dscp); - assert_int_equal(result, ISC_R_SUCCESS); - assert_int_equal(dscp, 1); - - result = dns_peer_getnotifydscp(peer, &dscp); - assert_int_equal(result, ISC_R_SUCCESS); - assert_int_equal(dscp, 2); - - result = dns_peer_gettransferdscp(peer, &dscp); - assert_int_equal(result, ISC_R_SUCCESS); - assert_int_equal(dscp, 3); - - dns_peer_detach(&peer); -} - -ISC_TEST_LIST_START - -ISC_TEST_ENTRY(dscp) - -ISC_TEST_LIST_END - -ISC_TEST_MAIN diff --git a/tests/libtest/ns.c b/tests/libtest/ns.c index 35d18aaa56..4a53ad8fc6 100644 --- a/tests/libtest/ns.c +++ b/tests/libtest/ns.c @@ -94,8 +94,7 @@ setup_server(void **state) { return (-1); } - result = ns_listenlist_default(mctx, port, -1, true, AF_INET, - &listenon); + result = ns_listenlist_default(mctx, port, true, AF_INET, &listenon); if (result != ISC_R_SUCCESS) { return (-1); } diff --git a/tests/ns/listenlist_test.c b/tests/ns/listenlist_test.c index 565b943f7d..80466b074a 100644 --- a/tests/ns/listenlist_test.c +++ b/tests/ns/listenlist_test.c @@ -63,7 +63,7 @@ ISC_RUN_TEST_IMPL(ns_listenlist_default) { UNUSED(state); - result = ns_listenlist_default(mctx, port, -1, false, AF_INET, &list); + result = ns_listenlist_default(mctx, port, false, AF_INET, &list); assert_int_equal(result, ISC_R_SUCCESS); assert_non_null(list); @@ -90,7 +90,7 @@ ISC_RUN_TEST_IMPL(ns_listenlist_default) { ns_listenlist_detach(&list); - result = ns_listenlist_default(mctx, port, -1, true, AF_INET, &list); + result = ns_listenlist_default(mctx, port, true, AF_INET, &list); assert_int_equal(result, ISC_R_SUCCESS); assert_false(ISC_LIST_EMPTY(list->elts));