mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 14:00:00 -04:00
1576. [bug] Race condition in dns_dispatch_addresponse().
[RT# 10272]
This commit is contained in:
parent
bf74532c94
commit
91c79af475
2 changed files with 5 additions and 4 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,4 +1,5 @@
|
|||
1576. [placeholder] rt10272
|
||||
1576. [bug] Race condition in dns_dispatch_addresponse().
|
||||
[RT# 10272]
|
||||
|
||||
1575. [func] Log TSIG name on TSIG verify failure. [RT #4404]
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dispatch.c,v 1.114 2004/02/03 00:59:04 marka Exp $ */
|
||||
/* $Id: dispatch.c,v 1.115 2004/02/10 06:11:17 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -1864,15 +1864,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);
|
||||
}
|
||||
|
|
@ -1891,7 +1892,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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue