]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
comments
authorEvan Hunt <each@isc.org>
Tue, 18 Feb 2020 21:38:41 +0000 (13:38 -0800)
committerWitold Kręcicki <wpk@isc.org>
Fri, 28 Feb 2020 07:46:16 +0000 (08:46 +0100)
lib/isc/netmgr/udp.c
lib/ns/client.c

index 823d01b5c1fb959edd5879cd108650a4ec3b90d6..a79855b490711f92330e9e53e8669b28558ba3aa 100644 (file)
@@ -339,7 +339,7 @@ udp_recv_cb(uv_udp_t *handle, ssize_t nrecv, const uv_buf_t *buf,
 /*
  * isc__nm_udp_send sends buf to a peer on a socket.
  * It tries to find a proper sibling/child socket so that we won't have
- * to jump to other thread.
+ * to jump to another thread.
  */
 isc_result_t
 isc__nm_udp_send(isc_nmhandle_t *handle, isc_region_t *region, isc_nm_cb_t cb,
@@ -380,10 +380,9 @@ isc__nm_udp_send(isc_nmhandle_t *handle, isc_region_t *region, isc_nm_cb_t cb,
        }
 
        /*
-        * If we're in netthread - send it directly
-        * If the original packet was received over a regular socket
-        * - send it over the same thread (assuming cpu affinity)
-        * Otherwise - use a random thread.
+        * If we're in the network thread, we can send directly.  If the
+        * handle is associated with a UDP socket, we can reuse its thread
+        * (assuming CPU affinity). Otherwise, pick a thread at random.
         */
        if (isc__nm_in_netthread()) {
                ntid = isc_nm_tid();
index 008defa1593ebc344224fb1f14103d99c4f5206e..5a0a913efd7865d0db95c2561c6f58a83935176d 100644 (file)
@@ -2330,6 +2330,10 @@ ns__client_setup(ns_client_t *client, ns_clientmgr_t *mgr, bool new) {
                isc_mem_t *oldmctx = client->mctx;
                ns_query_t query = client->query;
 
+               /*
+                * Retain these values from the existing client, but
+                * zero every thing else.
+                */
                *client = (ns_client_t){ .magic = 0,
                                         .mctx = oldmctx,
                                         .manager = oldmgr,