2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

237. [bug] If connect() returned ENOBUFS when the resolver was

initiating a TCP query, the socket didn't get destroyed,
                        and the server did not shut down cleanly.  [RT #107]
This commit is contained in:
Andreas Gustafsson
2000-06-05 22:31:54 +00:00
parent 5a75472f64
commit 9c11326b18
2 changed files with 12 additions and 6 deletions

View File

@@ -1,3 +1,7 @@
237. [bug] If connect() returned ENOBUFS when the resolver was
initiating a TCP query, the socket didn't get destroyed,
and the server did not shut down cleanly.
236. [func] Added new listen-on-v6 config file statement.
235. [func] Consider it a config file error if a listen-on

View File

@@ -684,10 +684,8 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
INSIST(0);
}
result = isc_socket_bind(query->tcpsocket, &any);
if (result != ISC_R_SUCCESS) {
isc_socket_detach(&query->tcpsocket);
goto cleanup_query;
}
if (result != ISC_R_SUCCESS)
goto cleanup_socket;
/*
* A dispatch will be created once the connect succeeds.
@@ -730,7 +728,7 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
&addrinfo->sockaddr, task,
resquery_connected, query);
if (result != ISC_R_SUCCESS)
goto cleanup_query;
goto cleanup_socket;
query->attributes |= RESQUERY_ATTR_CONNECTING;
QTRACE("connecting via TCP");
} else {
@@ -743,8 +741,12 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
return (ISC_R_SUCCESS);
cleanup_socket:
isc_socket_detach(&query->tcpsocket);
cleanup_dispatch:
dns_dispatch_detach(&query->dispatch);
if (query->dispatch != NULL)
dns_dispatch_detach(&query->dispatch);
cleanup_query:
query->magic = 0;