diff --git a/CHANGES b/CHANGES index 65bf396b2b..9051f8e197 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2390 [bug] dispatch.c could make a false warning on 'odd socket'. + [RT #18301]. + 2389 [bug] Move the "working directory writable" check to after the ns_os_changeuser() call. [RT #18326] diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c index 6ffe1d0fcd..d3c18aa81b 100644 --- a/lib/dns/dispatch.c +++ b/lib/dns/dispatch.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dispatch.c,v 1.116.18.25 2008/07/03 00:14:39 each Exp $ */ +/* $Id: dispatch.c,v 1.116.18.26 2008/07/18 02:38:32 jinmei Exp $ */ /*! \file */ @@ -1024,18 +1024,23 @@ udp_recv(isc_event_t *ev_in, dns_dispatch_t *disp, dispsocket_t *dispsock) { return; } - if (dispsock != NULL && - (disp->attributes & DNS_DISPATCHATTR_EXCLUSIVE) != 0) { - resp = dispsock->resp; - id = resp->id; - if (ev->result != ISC_R_SUCCESS) { - /* - * This is most likely a network error on a connected - * socket. It makes no sense to check the address or - * parse the packet, but it will help to return the - * error to the caller. - */ - goto sendresponse; + if ((disp->attributes & DNS_DISPATCHATTR_EXCLUSIVE) != 0) { + if (dispsock != NULL) { + resp = dispsock->resp; + id = resp->id; + if (ev->result != ISC_R_SUCCESS) { + /* + * This is most likely a network error on a + * connected socket. It makes no sense to + * check the address or parse the packet, but it + * will help to return the error to the caller. + */ + goto sendresponse; + } + } else { + UNLOCK(&disp->lock); + isc_event_free(&ev_in); + return; } } else if (ev->result != ISC_R_SUCCESS) { free_buffer(disp, ev->region.base, ev->region.length);