1576. [bug] Race condition in dns_dispatch_addresponse().

[RT# 10272]
This commit is contained in:
Mark Andrews
2004-02-10 06:16:54 +00:00
parent 3ed735135d
commit 2b02a4e4ce
2 changed files with 6 additions and 3 deletions
+3
View File
@@ -1,3 +1,6 @@
1576. [bug] Race condition in dns_dispatch_addresponse().
[RT# 10272]
1567. [bug] B.ROOT-SERVERS.NET is now 192.228.79.201.
1566. [port] Support for the cmsg framework on Solaris and HP/UX.
+3 -3
View File
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dispatch.c,v 1.101.2.6 2003/07/22 04:03:40 marka Exp $ */
/* $Id: dispatch.c,v 1.101.2.7 2004/02/10 06:16:54 marka Exp $ */
#include <config.h>
@@ -1770,15 +1770,16 @@ dns_dispatch_addresponse(dns_dispatch_t *disp, isc_sockaddr_t *dest,
id &= 0x0000ffff;
bucket = dns_hash(qid, dest, id);
}
UNLOCK(&qid->lock);
if (!ok) {
UNLOCK(&qid->lock);
UNLOCK(&disp->lock);
return (ISC_R_NOMORE);
}
res = isc_mempool_get(disp->mgr->rpool);
if (res == NULL) {
UNLOCK(&qid->lock);
UNLOCK(&disp->lock);
return (ISC_R_NOMEMORY);
}
@@ -1797,7 +1798,6 @@ dns_dispatch_addresponse(dns_dispatch_t *disp, isc_sockaddr_t *dest,
ISC_LIST_INIT(res->items);
ISC_LINK_INIT(res, link);
res->magic = RESPONSE_MAGIC;
LOCK(&qid->lock);
ISC_LIST_APPEND(qid->qid_table[bucket], res, link);
UNLOCK(&qid->lock);