summaryrefslogtreecommitdiff
path: root/lib/dns/dispatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dns/dispatch.c')
-rw-r--r--lib/dns/dispatch.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c
index 632d349577ac..9c236a28629e 100644
--- a/lib/dns/dispatch.c
+++ b/lib/dns/dispatch.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2009, 2011 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dispatch.c,v 1.155.12.11 2009-12-02 23:26:28 marka Exp $ */
+/* $Id: dispatch.c,v 1.155.12.14 2011-04-06 10:34:27 marka Exp $ */
/*! \file */
@@ -881,6 +881,12 @@ get_dispsocket(dns_dispatch_t *disp, isc_sockaddr_t *dest,
}
portentry->refs++;
break;
+ } else if (result == ISC_R_NOPERM) {
+ char buf[ISC_SOCKADDR_FORMATSIZE];
+ isc_sockaddr_format(&localaddr, buf, sizeof(buf));
+ dispatch_log(disp, ISC_LOG_WARNING,
+ "open_socket(%s) -> %s: continuing",
+ buf, isc_result_totext(result));
} else if (result != ISC_R_ADDRINUSE)
break;
}
@@ -1255,7 +1261,6 @@ udp_recv(isc_event_t *ev_in, dns_dispatch_t *disp, dispsocket_t *dispsock) {
* Look at flags. If query, drop it. If response,
* look to see where it goes.
*/
- queue_response = ISC_FALSE;
if ((flags & DNS_MESSAGEFLAG_QR) == 0) {
/* query */
free_buffer(disp, ev->region.base, ev->region.length);
@@ -1514,7 +1519,6 @@ tcp_recv(isc_task_t *task, isc_event_t *ev_in) {
* Look at flags. If query, drop it. If response,
* look to see where it goes.
*/
- queue_response = ISC_FALSE;
if ((flags & DNS_MESSAGEFLAG_QR) == 0) {
/*
* Query.
@@ -2316,9 +2320,9 @@ qid_allocate(dns_dispatchmgr_t *mgr, unsigned int buckets,
qid->sock_table = isc_mem_get(mgr->mctx, buckets *
sizeof(dispsocketlist_t));
if (qid->sock_table == NULL) {
- isc_mem_put(mgr->mctx, qid, sizeof(*qid));
isc_mem_put(mgr->mctx, qid->qid_table,
buckets * sizeof(dns_displist_t));
+ isc_mem_put(mgr->mctx, qid, sizeof(*qid));
return (ISC_R_NOMEMORY);
}
}
@@ -2926,7 +2930,6 @@ dns_dispatch_detach(dns_dispatch_t **dispp) {
INSIST(disp->refcount > 0);
disp->refcount--;
- killit = ISC_FALSE;
if (disp->refcount == 0) {
if (disp->recv_pending > 0)
isc_socket_cancel(disp->socket, disp->task[0],
@@ -3199,7 +3202,6 @@ dns_dispatch_removeresponse(dns_dispentry_t **resp,
disp->requests--;
INSIST(disp->refcount > 0);
disp->refcount--;
- killit = ISC_FALSE;
if (disp->refcount == 0) {
if (disp->recv_pending > 0)
isc_socket_cancel(disp->socket, disp->task[0],