mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 15:45:25 +00:00
comments
This commit is contained in:
committed by
Witold Kręcicki
parent
4b6a064972
commit
0b76d8a490
@@ -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.
|
* 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
|
* 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_result_t
|
||||||
isc__nm_udp_send(isc_nmhandle_t *handle, isc_region_t *region, isc_nm_cb_t cb,
|
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 we're in the network thread, we can send directly. If the
|
||||||
* If the original packet was received over a regular socket
|
* handle is associated with a UDP socket, we can reuse its thread
|
||||||
* - send it over the same thread (assuming cpu affinity)
|
* (assuming CPU affinity). Otherwise, pick a thread at random.
|
||||||
* Otherwise - use a random thread.
|
|
||||||
*/
|
*/
|
||||||
if (isc__nm_in_netthread()) {
|
if (isc__nm_in_netthread()) {
|
||||||
ntid = isc_nm_tid();
|
ntid = isc_nm_tid();
|
||||||
|
@@ -2330,6 +2330,10 @@ ns__client_setup(ns_client_t *client, ns_clientmgr_t *mgr, bool new) {
|
|||||||
isc_mem_t *oldmctx = client->mctx;
|
isc_mem_t *oldmctx = client->mctx;
|
||||||
ns_query_t query = client->query;
|
ns_query_t query = client->query;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Retain these values from the existing client, but
|
||||||
|
* zero every thing else.
|
||||||
|
*/
|
||||||
*client = (ns_client_t){ .magic = 0,
|
*client = (ns_client_t){ .magic = 0,
|
||||||
.mctx = oldmctx,
|
.mctx = oldmctx,
|
||||||
.manager = oldmgr,
|
.manager = oldmgr,
|
||||||
|
Reference in New Issue
Block a user