mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
clean up outerhandle when a tcpdns socket is disconnected
this prevents a crash when some non-netmgr thread, such as a recursive lookup, times out after the TCP socket is already disconnected.
This commit is contained in:
@@ -98,14 +98,6 @@ struct isc_nmhandle {
|
||||
isc_nmsocket_t *sock;
|
||||
size_t ah_pos; /* Position in the socket's 'active handles' array */
|
||||
|
||||
/*
|
||||
* The handle is 'inflight' if netmgr is not currently processing
|
||||
* it in any way - it might mean that e.g. a recursive resolution
|
||||
* is happening. For an inflight handle we must wait for the
|
||||
* calling code to finish before we can free it.
|
||||
*/
|
||||
atomic_bool inflight;
|
||||
|
||||
isc_sockaddr_t peer;
|
||||
isc_sockaddr_t local;
|
||||
isc_nm_opaquecb_t doreset; /* reset extra callback, external */
|
||||
@@ -650,6 +642,12 @@ isc__nmsocket_active(isc_nmsocket_t *sock);
|
||||
* or, for child sockets, 'sock->parent->active'.
|
||||
*/
|
||||
|
||||
void
|
||||
isc__nmsocket_clearcb(isc_nmsocket_t *sock);
|
||||
/*%<
|
||||
* Clear the recv and accept callbacks in 'sock'.
|
||||
*/
|
||||
|
||||
void
|
||||
isc__nm_async_closecb(isc__networker_t *worker, isc__netievent_t *ev0);
|
||||
/*%<
|
||||
|
Reference in New Issue
Block a user