mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 21:47:59 +00:00
2789. [bug] Fixed an INSIST in dispatch.c [RT #20576]
This commit is contained in:
parent
f6aa4de371
commit
cfc22e53a8
2
CHANGES
2
CHANGES
@ -1,3 +1,5 @@
|
|||||||
|
2789. [bug] Fixed an INSIST in dispatch.c [RT #20576]
|
||||||
|
|
||||||
2788. [bug] dnssec-signzone could sign with keys that were
|
2788. [bug] dnssec-signzone could sign with keys that were
|
||||||
not requested [RT #20625]
|
not requested [RT #20625]
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: dispatch.c,v 1.164 2009/09/01 00:22:26 jinmei Exp $ */
|
/* $Id: dispatch.c,v 1.165 2009/11/25 05:55:32 each Exp $ */
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
@ -778,6 +778,9 @@ new_portentry(dns_dispatch_t *disp, in_port_t port) {
|
|||||||
return (portentry);
|
return (portentry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*%
|
||||||
|
* The caller must not hold the qid->lock.
|
||||||
|
*/
|
||||||
static void
|
static void
|
||||||
deref_portentry(dns_dispatch_t *disp, dispportentry_t **portentryp) {
|
deref_portentry(dns_dispatch_t *disp, dispportentry_t **portentryp) {
|
||||||
dispportentry_t *portentry = *portentryp;
|
dispportentry_t *portentry = *portentryp;
|
||||||
@ -785,6 +788,9 @@ deref_portentry(dns_dispatch_t *disp, dispportentry_t **portentryp) {
|
|||||||
REQUIRE(disp->port_table != NULL);
|
REQUIRE(disp->port_table != NULL);
|
||||||
REQUIRE(portentry != NULL && portentry->refs > 0);
|
REQUIRE(portentry != NULL && portentry->refs > 0);
|
||||||
|
|
||||||
|
dns_qid_t *qid;
|
||||||
|
qid = DNS_QID(disp);
|
||||||
|
LOCK(&qid->lock);
|
||||||
portentry->refs--;
|
portentry->refs--;
|
||||||
if (portentry->refs == 0) {
|
if (portentry->refs == 0) {
|
||||||
ISC_LIST_UNLINK(disp->port_table[portentry->port %
|
ISC_LIST_UNLINK(disp->port_table[portentry->port %
|
||||||
@ -794,6 +800,7 @@ deref_portentry(dns_dispatch_t *disp, dispportentry_t **portentryp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
*portentryp = NULL;
|
*portentryp = NULL;
|
||||||
|
UNLOCK(&qid->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*%
|
/*%
|
||||||
@ -811,8 +818,9 @@ socket_search(dns_qid_t *qid, isc_sockaddr_t *dest, in_port_t port,
|
|||||||
dispsock = ISC_LIST_HEAD(qid->sock_table[bucket]);
|
dispsock = ISC_LIST_HEAD(qid->sock_table[bucket]);
|
||||||
|
|
||||||
while (dispsock != NULL) {
|
while (dispsock != NULL) {
|
||||||
if (isc_sockaddr_equal(dest, &dispsock->host) &&
|
if (dispsock->portentry != NULL &&
|
||||||
dispsock->portentry->port == port)
|
dispsock->portentry->port == port &&
|
||||||
|
isc_sockaddr_equal(dest, &dispsock->host))
|
||||||
return (dispsock);
|
return (dispsock);
|
||||||
dispsock = ISC_LIST_NEXT(dispsock, blink);
|
dispsock = ISC_LIST_NEXT(dispsock, blink);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user