bind9/lib
Ondřej Surý bf9fd2a6ff
Reset the TCP connection on a failed send
When sending fails, the ns__client_request() would not reset the
connection and continue as nothing is happening.  This comes from the
model that we don't care about failed UDP sends because datagrams are
unreliable anyway, but it greatly affects TCP connections with
keep-alive.

The worst case scenario is as follows:

1. the 3-way TCP handshake gets completed
2. the libuv calls the "uv_connection_cb" callback
3. the TCP connection gets queue because of the tcp-clients quota
4. the TCP client sends as many DNS messages as the buffers allow
5. the TCP connection gets dropped by the client due to the timeout
6. the TCP connection gets accepted by the server
7. the data already sent by the client gets read
8. all sending fails immediately because the TCP connection is dead
9. we consume all the data in the buffer in a very tight loop

As it doesn't make sense to trying to process more data on the TCP
connection when the sending is failing, drop the connection immediately
on the first sending error.
2024-07-03 09:07:20 +02:00
..
dns Be smarter about refusing to add many RR types to the database 2024-07-01 12:48:51 +02:00
isc Throttle the reading when writes are asynchronous 2024-07-03 08:45:39 +02:00
isccc Rework isccc_ccmsg to support multiple messages per tcp read 2024-04-18 20:08:44 +02:00
isccfg Mark SIG(0) quota settings as experimantal 2024-06-10 17:36:45 +02:00
ns Reset the TCP connection on a failed send 2024-07-03 09:07:20 +02:00
.gitignore The isc/platform.h header has been completely removed 2021-07-06 05:33:48 +00:00
Makefile.am Move irs_resconf into libdns and remove libirs 2023-02-24 09:38:59 +00:00