]> git.ipfire.org Git - thirdparty/bind9.git/commit
Improve the logging on failed TCP accept
authorOndřej Surý <ondrej@isc.org>
Wed, 1 Dec 2021 16:41:20 +0000 (17:41 +0100)
committerOndřej Surý <ondrej@isc.org>
Thu, 2 Dec 2021 13:19:46 +0000 (14:19 +0100)
commit75c484e36d6d28da820bfcf530a28b4f785049a6
tree40d8e60dab4a2a4fcca931ab722b2d11f6eac4d3
parentdd243656be41af9ebced34ad37c70cc4837cd353
Improve the logging on failed TCP accept

Previously, when TCP accept failed, we have logged a message with
ISC_LOG_ERROR level.  One common case, how this could happen is that the
client hits TCP client quota and is put on hold and when resumed, the
client has already given up and closed the TCP connection.  In such
case, the named would log:

    TCP connection failed: socket is not connected

This message was quite confusing because it actually doesn't say that
it's related to the accepting the TCP connection and also it logs
everything on the ISC_LOG_ERROR level.

Change the log message to "Accepting TCP connection failed" and for
specific error states lower the severity of the log message to
ISC_LOG_INFO.

(cherry picked from commit 20ac73eb222e60395399b467b0a72015a4dd8845)
lib/isc/netmgr/netmgr-int.h
lib/isc/netmgr/netmgr.c
lib/isc/netmgr/tcp.c
lib/isc/netmgr/tcpdns.c