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

Handle TCP sockets in isc__nmsocket_reset()

The isc__nmsocket_reset() was missing a case for raw TCP sockets (used
by RNDC and DoH) which would case a assertion failure when write timeout
would be triggered.

TCP sockets are now also properly handled in isc__nmsocket_reset().
This commit is contained in:
Ondřej Surý
2022-02-28 10:25:06 +01:00
committed by Evan Hunt
parent e2636b1de0
commit b220fb32bd

View File

@@ -2851,8 +2851,13 @@ isc__nmsocket_reset(isc_nmsocket_t *sock) {
REQUIRE(VALID_NMSOCK(sock));
switch (sock->type) {
case isc_nm_tcpsocket:
case isc_nm_tcpdnssocket:
case isc_nm_tlsdnssocket:
/*
* This can be called from the TCP write timeout, or
* from the TCPDNS or TLSDNS branches of isc_nm_bad_request().
*/
REQUIRE(sock->parent == NULL);
break;
default: