diff --git a/CHANGES b/CHANGES index 30afe3d3f9..6e8edb7cec 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4535. [bug] Address race condition in setting / testing of + DNS_REQUEST_F_SENDING. [RT #43889] + 4534. [bug] Only set RD, RA and CD in QUERY responses. [RT #43879] 4533. [bug] dns_client_update should terminate on prerequisite diff --git a/lib/dns/request.c b/lib/dns/request.c index f8433e224d..ee6a5142aa 100644 --- a/lib/dns/request.c +++ b/lib/dns/request.c @@ -445,10 +445,11 @@ req_send(dns_request_t *request, isc_task_t *task, isc_sockaddr_t *address) { sendevent->dscp = request->dscp; } + request->flags |= DNS_REQUEST_F_SENDING; result = isc_socket_sendto2(sock, &r, task, address, NULL, sendevent, 0); - if (result == ISC_R_SUCCESS) - request->flags |= DNS_REQUEST_F_SENDING; + if (result != ISC_R_SUCCESS) + request->flags &= ~DNS_REQUEST_F_SENDING; return (result); }