From: Ondřej Surý Date: Tue, 1 Feb 2022 17:36:12 +0000 (+0100) Subject: Add log message when hard quota is reached in TCP accept X-Git-Tag: v9.19.0~131^2~1 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=2ae84702ad0482cbbd5da4113b47d63b23ffe386;p=thirdparty%2Fbind9.git Add log message when hard quota is reached in TCP accept When isc_quota_attach_cb() API returns ISC_R_QUOTA (meaning hard quota was reached) the accept_connection() would return without logging a message about quota reached. Change the connection callback to log the quota reached message. --- diff --git a/lib/isc/netmgr/tcp.c b/lib/isc/netmgr/tcp.c index d97c2b486c6..b0034b9cbf2 100644 --- a/lib/isc/netmgr/tcp.c +++ b/lib/isc/netmgr/tcp.c @@ -628,7 +628,7 @@ tcp_connection_cb(uv_stream_t *server, int status) { &ssock->quotacb); if (result == ISC_R_QUOTA) { isc__nm_incstats(ssock, STATID_ACCEPTFAIL); - return; + goto done; } } diff --git a/lib/isc/netmgr/tcpdns.c b/lib/isc/netmgr/tcpdns.c index 8999207e0a5..21d1ab5bc6b 100644 --- a/lib/isc/netmgr/tcpdns.c +++ b/lib/isc/netmgr/tcpdns.c @@ -597,7 +597,7 @@ tcpdns_connection_cb(uv_stream_t *server, int status) { &ssock->quotacb); if (result == ISC_R_QUOTA) { isc__nm_incstats(ssock, STATID_ACCEPTFAIL); - return; + goto done; } } diff --git a/lib/isc/netmgr/tlsdns.c b/lib/isc/netmgr/tlsdns.c index 135a854662c..d56c82857ad 100644 --- a/lib/isc/netmgr/tlsdns.c +++ b/lib/isc/netmgr/tlsdns.c @@ -670,7 +670,7 @@ tlsdns_connection_cb(uv_stream_t *server, int status) { &ssock->quotacb); if (result == ISC_R_QUOTA) { isc__nm_incstats(ssock, STATID_ACCEPTFAIL); - return; + goto done; } }