From: Daniel Salzman Date: Mon, 1 Jul 2019 11:48:17 +0000 (+0200) Subject: conf: remove deprecated tcp-handshake-timeout X-Git-Tag: v2.9.0~211 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ad0ea2fbb6e7c610d57cb95d899c839a082e6a2;p=thirdparty%2Fknot-dns.git conf: remove deprecated tcp-handshake-timeout --- diff --git a/doc/man/knot.conf.5in b/doc/man/knot.conf.5in index 4a05bc0efa..9150e6849c 100644 --- a/doc/man/knot.conf.5in +++ b/doc/man/knot.conf.5in @@ -183,7 +183,6 @@ server: tcp\-workers: INT background\-workers: INT async\-start: BOOL - tcp\-handshake\-timeout: TIME tcp\-idle\-timeout: TIME tcp\-reply\-timeout: TIME max\-tcp\-clients: INT @@ -257,17 +256,9 @@ If enabled, server doesn\(aqt wait for the zones to be loaded and starts responding immediately with SERVFAIL answers until the zone loads. .sp \fIDefault:\fP off -.SS tcp\-handshake\-timeout -.sp -Maximum time between newly accepted TCP connection and the first query. -This is useful to disconnect inactive connections faster than connections -that already made at least 1 meaningful query. -.sp -\fIDefault:\fP 5 .SS tcp\-idle\-timeout .sp -Maximum idle time between requests on a TCP connection. This also limits -receiving of a single query, each query must be received in this time limit. +Maximum idle time between requests on an incoming TCP connection. .sp \fIDefault:\fP 20 .SS tcp\-reply\-timeout diff --git a/doc/reference.rst b/doc/reference.rst index 95c6cecc6f..634609a27e 100644 --- a/doc/reference.rst +++ b/doc/reference.rst @@ -134,7 +134,6 @@ General options related to the server. tcp-workers: INT background-workers: INT async-start: BOOL - tcp-handshake-timeout: TIME tcp-idle-timeout: TIME tcp-reply-timeout: TIME max-tcp-clients: INT @@ -245,24 +244,12 @@ responding immediately with SERVFAIL answers until the zone loads. *Default:* off -.. _server_tcp-handshake-timeout: - -tcp-handshake-timeout ---------------------- - -Maximum time between newly accepted TCP connection and the first query. -This is useful to disconnect inactive connections faster than connections -that already made at least 1 meaningful query. - -*Default:* 5 - .. _server_tcp-idle-timeout: tcp-idle-timeout ---------------- -Maximum idle time between requests on a TCP connection. This also limits -receiving of a single query, each query must be received in this time limit. +Maximum idle time between requests on an incoming TCP connection. *Default:* 20 diff --git a/src/knot/conf/base.c b/src/knot/conf/base.c index b7008b2a82..298ead39c3 100644 --- a/src/knot/conf/base.c +++ b/src/knot/conf/base.c @@ -121,9 +121,6 @@ static void init_cache( } conf->cache.srv_max_ipv6_udp_payload = conf_int(&val); - val = conf_get(conf, C_SRV, C_TCP_HSHAKE_TIMEOUT); - conf->cache.srv_tcp_hshake_timeout = conf_int(&val); - val = conf_get(conf, C_SRV, C_TCP_IDLE_TIMEOUT); conf->cache.srv_tcp_idle_timeout = conf_int(&val); diff --git a/src/knot/conf/base.h b/src/knot/conf/base.h index 8ba11e74f1..f22c703ff2 100644 --- a/src/knot/conf/base.h +++ b/src/knot/conf/base.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018 CZ.NIC, z.s.p.o. +/* Copyright (C) 2019 CZ.NIC, z.s.p.o. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -108,7 +108,6 @@ typedef struct { struct { int16_t srv_max_ipv4_udp_payload; int16_t srv_max_ipv6_udp_payload; - int32_t srv_tcp_hshake_timeout; int32_t srv_tcp_idle_timeout; int32_t srv_tcp_reply_timeout; int32_t srv_max_tcp_clients; diff --git a/src/knot/conf/tools.c b/src/knot/conf/tools.c index 93f23fa2fb..c53541dc4e 100644 --- a/src/knot/conf/tools.c +++ b/src/knot/conf/tools.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018 CZ.NIC, z.s.p.o. +/* Copyright (C) 2019 CZ.NIC, z.s.p.o. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -288,6 +288,13 @@ int check_module_id( int check_server( knotd_conf_check_args_t *args) { + conf_val_t hshake = conf_get_txn(args->extra->conf, args->extra->txn, C_SRV, + C_TCP_HSHAKE_TIMEOUT); + + if (hshake.code == KNOT_EOK) { + CONF_LOG(LOG_NOTICE, "TCP handshake timeout no longer supported"); + } + return KNOT_EOK; }