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

fix nmhandle attach/detach errors in tcpdnsconnect_cb()

we need to attach to the statichandle when connecting TCPDNS sockets,
same as with UDP.
This commit is contained in:
Ondřej Surý
2020-11-04 20:59:31 +01:00
parent d48e040035
commit 2191d2bf44
2 changed files with 15 additions and 3 deletions

View File

@@ -1206,7 +1206,8 @@ isc__nmhandle_get(isc_nmsocket_t *sock, isc_sockaddr_t *peer,
UNLOCK(&sock->lock);
if (sock->type == isc_nm_tcpsocket ||
(sock->type == isc_nm_udpsocket && atomic_load(&sock->client)))
(sock->type == isc_nm_udpsocket && atomic_load(&sock->client)) ||
(sock->type == isc_nm_tcpdnssocket && atomic_load(&sock->client)))
{
INSIST(sock->statichandle == NULL);