]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
set the default rndc read timeout to 60 seconds
authorEvan Hunt <each@isc.org>
Wed, 3 May 2023 21:12:25 +0000 (14:12 -0700)
committerEvan Hunt <each@isc.org>
Fri, 5 May 2023 07:06:50 +0000 (00:06 -0700)
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

index 26cfa52e27d56608453becffea912234626e1100..8e635235cac4afa055f137af84d102acd2000561 100644 (file)
@@ -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);