From e36b5a099cfe648561d638e52642b2b848d7e3b6 Mon Sep 17 00:00:00 2001 From: Yorgos Thessalonikefs Date: Tue, 12 Mar 2024 14:52:00 +0100 Subject: [PATCH] Clearer documentation for tcp-idle-timeout and edns-tcp-keepalive-timeout (#1028) * - Clearer documentation for tcp-idle-timeout and edns-tcp-keepalive-timeout. * - Address review comment. --- doc/example.conf.in | 3 ++- doc/unbound.conf.5.in | 15 ++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/doc/example.conf.in b/doc/example.conf.in index 1ac155b7c..c8dc4e882 100644 --- a/doc/example.conf.in +++ b/doc/example.conf.in @@ -283,7 +283,8 @@ server: # Enable EDNS TCP keepalive option. # edns-tcp-keepalive: no - # Timeout for EDNS TCP keepalive, in msec. + # Timeout for EDNS TCP keepalive, in msec. Overrides tcp-idle-timeout + # if edns-tcp-keepalive is set. # edns-tcp-keepalive-timeout: 120000 # UDP queries that have waited in the socket buffer for a long time diff --git a/doc/unbound.conf.5.in b/doc/unbound.conf.5.in index 84eddd941..942271f86 100644 --- a/doc/unbound.conf.5.in +++ b/doc/unbound.conf.5.in @@ -472,6 +472,8 @@ configured value if the number of free buffers falls below 35% of the total number configured, and finally to 0 if the number of free buffers falls below 20% of the total number configured. A minimum timeout of 200 milliseconds is observed regardless of the option value used. +It will be overriden by \fBedns\-tcp\-keepalive\-timeout\fR if +\fBedns\-tcp\-keepalive\fR is enabled. .TP .B tcp-reuse-timeout: \fI\fR The period Unbound will keep TCP persistent connections open to @@ -490,20 +492,11 @@ This option defaults to 3000 milliseconds. Enable or disable EDNS TCP Keepalive. Default is no. .TP .B edns-tcp-keepalive-timeout: \fI\fR -The period Unbound will wait for a query on a TCP connection when -EDNS TCP Keepalive is active. If this timeout expires Unbound closes -the connection. If the client supports the EDNS TCP Keepalive option, +Overrides \fBtcp\-idle\-timeout\fR when \fBedns\-tcp\-keepalive\fR is enabled. +If the client supports the EDNS TCP Keepalive option, Unbound sends the timeout value to the client to encourage it to close the connection before the server times out. This option defaults to 120000 milliseconds. -When the number of free incoming TCP buffers falls below 50% of -the total number configured, the advertised timeout is progressively -reduced to 1% of the configured value, then to 0.2% of the configured -value if the number of free buffers falls below 35% of the total number -configured, and finally to 0 if the number of free buffers falls below -20% of the total number configured. -A minimum actual timeout of 200 milliseconds is observed regardless of the -advertised timeout. .TP .B sock\-queue\-timeout: \fI\fR UDP queries that have waited in the socket buffer for a long time can be -- 2.47.2