From: Ondřej Surý Date: Thu, 27 Jan 2022 09:09:07 +0000 (+0100) Subject: Remove the keep-response-order ACL map X-Git-Tag: v9.19.0~105^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d01562f22b73e7a339f1ffb4a90e3529e1752ef3;p=thirdparty%2Fbind9.git Remove the keep-response-order ACL map The keep-response-order option has been obsoleted, and in this commit, remove the keep-response-order ACL map rendering the option no-op, the call the isc_nm_sequential() and the now unused isc_nm_sequential() function itself. --- diff --git a/bin/named/server.c b/bin/named/server.c index 76097f341ba..ec132117054 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -8698,15 +8698,6 @@ load_configuration(const char *filename, named_server_t *server, server->sctx->blackholeacl); } - /* - * Set "keep-response-order". Only legal at options or - * global defaults level. - */ - CHECK(configure_view_acl(NULL, config, named_g_config, - "keep-response-order", NULL, - named_g_aclconfctx, named_g_mctx, - &server->sctx->keepresporder)); - obj = NULL; result = named_config_get(maps, "match-mapped-addresses", &obj); INSIST(result == ISC_R_SUCCESS); diff --git a/lib/bind9/check.c b/lib/bind9/check.c index a88aac6ad3d..556bfb6faf8 100644 --- a/lib/bind9/check.c +++ b/lib/bind9/check.c @@ -529,11 +529,9 @@ check_viewacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions, int i = 0; static const char *acls[] = { - "allow-query", "allow-query-on", - "allow-query-cache", "allow-query-cache-on", - "blackhole", "keep-response-order", - "match-clients", "match-destinations", - "sortlist", NULL + "allow-query", "allow-query-on", "allow-query-cache", + "allow-query-cache-on", "blackhole", "match-clients", + "match-destinations", "sortlist", NULL }; while (acls[i] != NULL) { diff --git a/lib/isc/include/isc/netmgr.h b/lib/isc/include/isc/netmgr.h index 16eedb708fb..f9e59f76921 100644 --- a/lib/isc/include/isc/netmgr.h +++ b/lib/isc/include/isc/netmgr.h @@ -395,24 +395,6 @@ isc_nm_listentlsdns(isc_nm_t *mgr, isc_sockaddr_t *iface, * Same as isc_nm_listentcpdns but for an SSL (DoT) socket. */ -void -isc_nm_sequential(isc_nmhandle_t *handle); -/*%< - * Disable pipelining on this connection. Each DNS packet will be only - * processed after the previous completes. - * - * The socket must be unpaused after the query is processed. This is done - * the response is sent, or if we're dropping the query, it will be done - * when a handle is fully dereferenced by calling the socket's - * closehandle_cb callback. - * - * Note: This can only be run while a message is being processed; if it is - * run before any messages are read, no messages will be read. - * - * Also note: once this has been set, it cannot be reversed for a given - * connection. - */ - void isc_nm_settimeouts(isc_nm_t *mgr, uint32_t init, uint32_t idle, uint32_t keepalive, uint32_t advertised); diff --git a/lib/isc/netmgr/netmgr-int.h b/lib/isc/netmgr/netmgr-int.h index 3a849b6c4b7..01a2a020921 100644 --- a/lib/isc/netmgr/netmgr-int.h +++ b/lib/isc/netmgr/netmgr-int.h @@ -1021,11 +1021,6 @@ struct isc_nmsocket { */ atomic_bool client; - /*% - * TCPDNS socket has been set not to pipeline. - */ - atomic_bool sequential; - /*% * The socket is processing read callback, this is guard to not read * data before the readcb is back. diff --git a/lib/isc/netmgr/netmgr.c b/lib/isc/netmgr/netmgr.c index 4676135b9c4..4b4871de9c7 100644 --- a/lib/isc/netmgr/netmgr.c +++ b/lib/isc/netmgr/netmgr.c @@ -1567,7 +1567,6 @@ isc___nmsocket_init(isc_nmsocket_t *sock, isc_nm_t *mgr, isc_nmsocket_type type, sock, isc_refcount_current(&sock->references)); atomic_init(&sock->active, true); - atomic_init(&sock->sequential, false); atomic_init(&sock->readpaused, false); atomic_init(&sock->closing, false); atomic_init(&sock->listening, 0); @@ -2334,9 +2333,8 @@ processbuffer(isc_nmsocket_t *sock) { * If we only have an incomplete DNS message, we don't touch any * timers. If we do have a full message, reset the timer. * - * Stop reading if this is a client socket, or if the server socket - * has been set to sequential mode. In this case we'll be called again - * later by isc__nm_resume_processing(). + * Stop reading if this is a client socket. In this case we'll be + * called again later by isc__nm_resume_processing(). */ void isc__nm_process_sock_buffer(isc_nmsocket_t *sock) { @@ -2372,8 +2370,7 @@ isc__nm_process_sock_buffer(isc_nmsocket_t *sock) { */ isc__nmsocket_timer_stop(sock); - if (atomic_load(&sock->client) || - atomic_load(&sock->sequential)) { + if (atomic_load(&sock->client)) { isc__nm_stop_reading(sock); return; } @@ -3447,39 +3444,6 @@ isc_nm_work_offload(isc_nm_t *netmgr, isc_nm_workcb_t work_cb, UV_RUNTIME_CHECK(uv_queue_work, r); } -void -isc_nm_sequential(isc_nmhandle_t *handle) { - isc_nmsocket_t *sock = NULL; - - REQUIRE(VALID_NMHANDLE(handle)); - REQUIRE(VALID_NMSOCK(handle->sock)); - - sock = handle->sock; - - switch (sock->type) { - case isc_nm_tcpdnssocket: - case isc_nm_tlsdnssocket: - break; - case isc_nm_httpsocket: - return; - default: - INSIST(0); - ISC_UNREACHABLE(); - } - - /* - * We don't want pipelining on this connection. That means - * that we need to pause after reading each request, and - * resume only after the request has been processed. This - * is done in isc__nm_resume_processing(), which is the - * socket's closehandle_cb callback, called whenever a handle - * is released. - */ - isc__nmsocket_timer_stop(sock); - isc__nm_stop_reading(sock); - atomic_store(&sock->sequential, true); -} - void isc_nm_bad_request(isc_nmhandle_t *handle) { isc_nmsocket_t *sock = NULL; diff --git a/lib/ns/client.c b/lib/ns/client.c index 214c83fedf1..a155243932e 100644 --- a/lib/ns/client.c +++ b/lib/ns/client.c @@ -1915,18 +1915,6 @@ ns__client_request(isc_nmhandle_t *handle, isc_result_t eresult, return; } - /* - * Disable pipelined TCP query processing if necessary. - */ - if (TCP_CLIENT(client) && - (client->message->opcode != dns_opcode_query || - (client->sctx->keepresporder != NULL && - dns_acl_allowed(&netaddr, NULL, client->sctx->keepresporder, - env)))) - { - isc_nm_sequential(handle); - } - dns_opcodestats_increment(client->sctx->opcodestats, client->message->opcode); switch (client->message->opcode) { diff --git a/lib/ns/include/ns/server.h b/lib/ns/include/ns/server.h index 1764d188693..a0f6d91401d 100644 --- a/lib/ns/include/ns/server.h +++ b/lib/ns/include/ns/server.h @@ -90,7 +90,6 @@ struct ns_server { uint32_t options; dns_acl_t *blackholeacl; - dns_acl_t *keepresporder; uint16_t udpsize; uint16_t transfer_tcp_message_size; bool interface_auto; diff --git a/lib/ns/server.c b/lib/ns/server.c index 162e344f88c..57bb753179d 100644 --- a/lib/ns/server.c +++ b/lib/ns/server.c @@ -158,9 +158,6 @@ ns_server_detach(ns_server_t **sctxp) { if (sctx->blackholeacl != NULL) { dns_acl_detach(&sctx->blackholeacl); } - if (sctx->keepresporder != NULL) { - dns_acl_detach(&sctx->keepresporder); - } if (sctx->tkeyctx != NULL) { dns_tkeyctx_destroy(&sctx->tkeyctx); }