*/
void
-isc_nm_tcpdns_sequential(isc_nmhandle_t *handle);
+isc_nm_sequential(isc_nmhandle_t *handle);
/*%<
* Disable pipelining on this connection. Each DNS packet will be only
* processed after the previous completes.
* to determine when to close a connection, rather than the idle timeout.
*/
-void
-isc_nm_tlsdns_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_tlsdns_keepalive(isc_nmhandle_t *handle, bool value);
/*%<
RUNTIME_CHECK(r == 0);
}
+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 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);
+}
+
#ifdef NETMGR_TRACE
/*
* Dump all active sockets in netmgr. We output to stderr
isc__nm_failed_read_cb(sock, ISC_R_EOF, false);
}
-void
-isc_nm_tcpdns_sequential(isc_nmhandle_t *handle) {
- isc_nmsocket_t *sock = NULL;
-
- REQUIRE(VALID_NMHANDLE(handle));
- REQUIRE(VALID_NMSOCK(handle->sock));
- REQUIRE(handle->sock->type == isc_nm_tcpdnssocket);
-
- sock = handle->sock;
-
- /*
- * 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 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_tcpdns_keepalive(isc_nmhandle_t *handle, bool value) {
isc_nmsocket_t *sock = NULL;
isc__nm_failed_read_cb(sock, ISC_R_EOF, false);
}
-void
-isc_nm_tlsdns_sequential(isc_nmhandle_t *handle) {
- isc_nmsocket_t *sock = NULL;
-
- REQUIRE(VALID_NMHANDLE(handle));
- REQUIRE(VALID_NMSOCK(handle->sock));
- REQUIRE(handle->sock->type == isc_nm_tlsdnssocket);
-
- sock = handle->sock;
-
- /*
- * 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 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_tlsdns_keepalive(isc_nmhandle_t *handle, bool value) {
isc_nmsocket_t *sock = NULL;
dns_acl_allowed(&netaddr, NULL, client->sctx->keepresporder,
env))))
{
- isc_nm_tcpdns_sequential(handle);
+ isc_nm_sequential(handle);
}
dns_opcodestats_increment(client->sctx->opcodestats,