]> 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:00:05 +0000 (21:00 +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.

lib/isc/netmgr/tcp.c
lib/isc/netmgr/tcpdns.c
lib/isc/netmgr/tlsdns.c

index d97c2b486c66d5594edbb48769780c3d9fb74a4c..b0034b9cbf2113839dc712d0fd25c2bc4c3c0ce0 100644 (file)
@@ -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;
                }
        }
 
index 8999207e0a50fd3cafb29323c634ec8825427427..21d1ab5bc6b225cfca1c26fbdf5d0746248eac56 100644 (file)
@@ -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;
                }
        }
 
index 135a854662c0a03beea0c237df046e79ff6942f9..d56c82857ada259f1dfdbda787d8f48bc2d286cd 100644 (file)
@@ -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;
                }
        }