#include <isc/random.h>
#include <isc/stats.h>
#include <isc/string.h>
+#include <isc/tid.h>
#include <isc/time.h>
#include <isc/tls.h>
#include <isc/util.h>
struct dns_dispatch {
/* Unlocked. */
- unsigned int magic; /*%< magic */
+ unsigned int magic; /*%< magic */
+ uint32_t tid;
dns_dispatchmgr_t *mgr; /*%< dispatch manager */
isc_nmhandle_t *handle; /*%< netmgr handle for TCP connection */
isc_sockaddr_t local; /*%< local address */
.link = ISC_LINK_INITIALIZER,
.active = ISC_LIST_INITIALIZER,
.pending = ISC_LIST_INITIALIZER,
+ .tid = isc_tid(),
.magic = DISPATCH_MAGIC,
};
LOCK(&disp->lock);
+ if (disp->tid != isc_tid()) {
+ UNLOCK(&disp->lock);
+ continue;
+ }
+
if (disp->handle != NULL) {
sockname = isc_nmhandle_localaddr(disp->handle);
peeraddr = isc_nmhandle_peeraddr(disp->handle);