mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 15:45:25 +00:00
Fix improper closed connection handling in tcpdns.
If dnslisten_readcb gets a read callback it needs to verify that the outer socket wasn't closed in the meantime, and issue a CANCELED callback if it was.
This commit is contained in:
committed by
Ondřej Surý
parent
f8730ae1a2
commit
3ab3d90de0
@@ -259,6 +259,11 @@ dnslisten_readcb(isc_nmhandle_t *handle, isc_result_t eresult,
|
|||||||
REQUIRE(VALID_NMSOCK(dnssock));
|
REQUIRE(VALID_NMSOCK(dnssock));
|
||||||
REQUIRE(dnssock->tid == isc_nm_tid());
|
REQUIRE(dnssock->tid == isc_nm_tid());
|
||||||
REQUIRE(VALID_NMHANDLE(handle));
|
REQUIRE(VALID_NMHANDLE(handle));
|
||||||
|
if (eresult == ISC_R_SUCCESS &&
|
||||||
|
(!isc__nmsocket_active(dnssock) || dnssock->outerhandle == NULL))
|
||||||
|
{
|
||||||
|
eresult = ISC_R_CANCELED;
|
||||||
|
}
|
||||||
|
|
||||||
if (region == NULL || eresult != ISC_R_SUCCESS) {
|
if (region == NULL || eresult != ISC_R_SUCCESS) {
|
||||||
/* Connection closed */
|
/* Connection closed */
|
||||||
|
Reference in New Issue
Block a user