From 916b301fd454339b49d5e30bdd9d33fca716b723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Tue, 1 Feb 2022 18:36:12 +0100 Subject: [PATCH 1/2] 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. (cherry picked from commit 2ae84702ad0482cbbd5da4113b47d63b23ffe386) --- lib/isc/netmgr/tcp.c | 2 +- lib/isc/netmgr/tcpdns.c | 2 +- lib/isc/netmgr/tlsdns.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/isc/netmgr/tcp.c b/lib/isc/netmgr/tcp.c index d97c2b486c..b0034b9cbf 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 8999207e0a..21d1ab5bc6 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 135a854662..d56c82857a 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; } } From b7fb29397aa9d71c99f87ff8ca8d0baa8a405e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Tue, 1 Feb 2022 18:41:46 +0100 Subject: [PATCH 2/2] Add CHANGES and release notes for [GL #3125] (cherry picked from commit 932fc7b826703f8b0f30ed11c496f94a02e6ebbb) --- CHANGES | 3 +++ doc/notes/notes-current.rst | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CHANGES b/CHANGES index 42f6eade62..f1640c52db 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +5801. [bug] Log "quota reached" message when hard quota + is reached when accepting a connection. [GL #3125] + 5800. [func] Add ECS support to the DLZ interface. [GL #3082] 5799. [bug] Use L1 cache-line size detected at runtime. [GL #3108] diff --git a/doc/notes/notes-current.rst b/doc/notes/notes-current.rst index eb9aab095a..b6ab999f21 100644 --- a/doc/notes/notes-current.rst +++ b/doc/notes/notes-current.rst @@ -49,3 +49,6 @@ Bug Fixes - A failed view configuration during a named reconfiguration procedure could cause inconsistencies in BIND internal structures, causing a crash or other unexpected errors. This has been fixed. :gl:`#3060` + +- Restore logging "quota reached" message when accepting connection is over + hard quota. :gl:`#3125`