From: Evan Hunt Date: Wed, 3 May 2023 21:12:25 +0000 (-0700) Subject: set the default rndc read timeout to 60 seconds X-Git-Tag: v9.19.13~3^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9cacf9e3365e8def6279a92f5b27537e1abcc75a;p=thirdparty%2Fbind9.git 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. --- diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index 26cfa52e27d..8e635235cac 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);