mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +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:
4
CHANGES
4
CHANGES
@@ -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.
|
236. [func] Added new listen-on-v6 config file statement.
|
||||||
|
|
||||||
235. [func] Consider it a config file error if a listen-on
|
235. [func] Consider it a config file error if a listen-on
|
||||||
|
@@ -684,10 +684,8 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
|
|||||||
INSIST(0);
|
INSIST(0);
|
||||||
}
|
}
|
||||||
result = isc_socket_bind(query->tcpsocket, &any);
|
result = isc_socket_bind(query->tcpsocket, &any);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS)
|
||||||
isc_socket_detach(&query->tcpsocket);
|
goto cleanup_socket;
|
||||||
goto cleanup_query;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A dispatch will be created once the connect succeeds.
|
* 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,
|
&addrinfo->sockaddr, task,
|
||||||
resquery_connected, query);
|
resquery_connected, query);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
goto cleanup_query;
|
goto cleanup_socket;
|
||||||
query->attributes |= RESQUERY_ATTR_CONNECTING;
|
query->attributes |= RESQUERY_ATTR_CONNECTING;
|
||||||
QTRACE("connecting via TCP");
|
QTRACE("connecting via TCP");
|
||||||
} else {
|
} else {
|
||||||
@@ -743,8 +741,12 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
|
|||||||
|
|
||||||
return (ISC_R_SUCCESS);
|
return (ISC_R_SUCCESS);
|
||||||
|
|
||||||
|
cleanup_socket:
|
||||||
|
isc_socket_detach(&query->tcpsocket);
|
||||||
|
|
||||||
cleanup_dispatch:
|
cleanup_dispatch:
|
||||||
dns_dispatch_detach(&query->dispatch);
|
if (query->dispatch != NULL)
|
||||||
|
dns_dispatch_detach(&query->dispatch);
|
||||||
|
|
||||||
cleanup_query:
|
cleanup_query:
|
||||||
query->magic = 0;
|
query->magic = 0;
|
||||||
|
Reference in New Issue
Block a user