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);
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) {
* 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);
*/
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.
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);
* 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) {
*/
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;
}
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;
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) {
uint32_t options;
dns_acl_t *blackholeacl;
- dns_acl_t *keepresporder;
uint16_t udpsize;
uint16_t transfer_tcp_message_size;
bool interface_auto;
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);
}