]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add log message when hard quota is reached in TCP accept
authorOndřej Surý <ondrej@isc.org>
Tue, 1 Feb 2022 17:36:12 +0000 (18:36 +0100)
committerOndřej Surý <ondrej@isc.org>
Tue, 1 Feb 2022 20:06:43 +0000 (21:06 +0100)
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
lib/isc/netmgr/tcpdns.c

index 05ef8d8cd51fc580a43ea9dc47bb8bec156edf3b..133d6d9e6139c7460e25640739c4c9213d0c750f 100644 (file)
@@ -627,7 +627,7 @@ tcp_connection_cb(uv_stream_t *server, int status) {
                if (result == ISC_R_QUOTA) {
                        isc__nm_incstats(ssock->mgr,
                                         ssock->statsindex[STATID_ACCEPTFAIL]);
-                       return;
+                       goto done;
                }
        }
 
index a1f500b352bad49bd254f883a8a309ae18cd6efc..38c8c692e15a34e299038f7e2140b1a8ce72fc9e 100644 (file)
@@ -596,7 +596,7 @@ tcpdns_connection_cb(uv_stream_t *server, int status) {
                if (result == ISC_R_QUOTA) {
                        isc__nm_incstats(ssock->mgr,
                                         ssock->statsindex[STATID_ACCEPTFAIL]);
-                       return;
+                       goto done;
                }
        }