2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

netmgr: don't send to an inactive (closing) udp socket

We had a race in which n UDP socket could have been already closing
by libuv but we still sent data to it. Mark socket as not-active
when stopping listening and verify that socket is not active when
trying to send data to it.
This commit is contained in:
Witold Kręcicki
2020-01-16 11:52:58 +01:00
parent 402f067fc0
commit 16908ec3d9
3 changed files with 21 additions and 5 deletions

View File

@@ -681,7 +681,7 @@ isc__nm_enqueue_ievent(isc__networker_t *worker, isc__netievent_t *event) {
uv_async_send(&worker->async);
}
static bool
bool
isc__nmsocket_active(isc_nmsocket_t *sock) {
REQUIRE(VALID_NMSOCK(sock));
if (sock->parent != NULL) {