]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove the keep-response-order ACL map
authorOndřej Surý <ondrej@isc.org>
Thu, 27 Jan 2022 09:09:07 +0000 (10:09 +0100)
committerOndřej Surý <ondrej@isc.org>
Fri, 18 Feb 2022 08:16:03 +0000 (09:16 +0100)
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.

bin/named/server.c
lib/bind9/check.c
lib/isc/include/isc/netmgr.h
lib/isc/netmgr/netmgr-int.h
lib/isc/netmgr/netmgr.c
lib/ns/client.c
lib/ns/include/ns/server.h
lib/ns/server.c

index 76097f341ba33f680c1eb7edf1dc417b188af61f..ec132117054d09b794c181f82f1043cac8651aca 100644 (file)
@@ -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);
index a88aac6ad3d2379b538c980f4c5a961d883aeaac..556bfb6faf8c81309b956f0aa23b0d6c2a70001a 100644 (file)
@@ -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) {
index 16eedb708fbbf2e5dbf0ad1d3b95d53563eb6df7..f9e59f769212e5cd1432b88287fc2841b1b1bec8 100644 (file)
@@ -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);
index 3a849b6c4b7052ed9be2252d349f826daaab8934..01a2a0209216e80f279715b6b52a291e88b3fc2b 100644 (file)
@@ -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.
index 4676135b9c452963361aa8f70265631ee43e8ec3..4b4871de9c733c7750f8ed4a4f9734d0900bcead 100644 (file)
@@ -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;
index 214c83fedf1a581e22255537a67ae2d2e5e2ff14..a155243932ef5ab5e20e137418956e8e8501d59e 100644 (file)
@@ -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) {
index 1764d188693fe229b82649420f2d651933f620af..a0f6d91401d425af68ef5f6aa5fbe8f5c9573d7f 100644 (file)
@@ -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;
index 162e344f88c3c14bf1f35fdae6dae471d3c1b834..57bb753179d4f13a8a2d19b544b983bab6ccb4fe 100644 (file)
@@ -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);
                }