From 9cacf9e3365e8def6279a92f5b27537e1abcc75a Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Wed, 3 May 2023 14:12:25 -0700 Subject: [PATCH 1/2] set the default rndc read timeout to 60 seconds While the connect timeout was set to 60 seconds in rndc, the idle read timeout was left at the default value of 30 seconds. This commit sets it back to 60, to match the behavior in 9.16 and earlier. --- bin/rndc/rndc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index 26cfa52e27..8e635235ca 100644 --- a/bin/rndc/rndc.c +++ b/bin/rndc/rndc.c @@ -50,7 +50,8 @@ #include "util.h" -#define SERVERADDRS 10 +#define SERVERADDRS 10 +#define RNDC_TIMEOUT 60 * 1000 const char *progname = NULL; bool verbose; @@ -526,7 +527,7 @@ rndc_startconnect(isc_sockaddr_t *addr) { } isc_nm_tcpconnect(netmgr, local, addr, rndc_connected, &rndc_ccmsg, - 60000); + RNDC_TIMEOUT); } static void @@ -955,6 +956,8 @@ main(int argc, char **argv) { isc_managers_create(&rndc_mctx, 1, &loopmgr, &netmgr); isc_loopmgr_setup(loopmgr, rndc_start, NULL); + isc_nm_settimeouts(netmgr, RNDC_TIMEOUT, RNDC_TIMEOUT, RNDC_TIMEOUT, 0); + isc_log_create(rndc_mctx, &log, &logconfig); isc_log_setcontext(log); isc_log_settag(logconfig, progname); From dfc8efc467e3b53cfd2e100843388305883413d6 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Wed, 3 May 2023 14:16:58 -0700 Subject: [PATCH 2/2] CHANGES and release note for [GL #4046] --- CHANGES | 4 ++++ doc/notes/notes-current.rst | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/CHANGES b/CHANGES index 645a2c9684..eac5a1a7c8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +6164. [bug] Set the rndc idle read timeout back to 60 seconds, + from the netmgr default of 30 seconds, in order to + match the behavior of 9.16 and earlier. [GL #4046] + 6163. [func] Add option to dnstap-read to use timestamps in milliseconds (thanks to Oliver Ford). [GL #2360] diff --git a/doc/notes/notes-current.rst b/doc/notes/notes-current.rst index fd3c957985..e06d042a4c 100644 --- a/doc/notes/notes-current.rst +++ b/doc/notes/notes-current.rst @@ -56,6 +56,10 @@ Bug Fixes logging :any:`channel` configured an absolute path as ``file`` destination. This has now been fixed. :gl:`#3991`. +- The read timeout in ``rndc`` is now 60 seconds, matching the behavior + in BIND 9.16 and earlier. It had previously been lowered to 30 seconds + by mistake. :gl:`#4046` + Known Issues ~~~~~~~~~~~~