]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
nsupdate: set network manager default timeout values
authorAram Sargsyan <aram@isc.org>
Fri, 31 Mar 2023 12:25:01 +0000 (12:25 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Mon, 3 Apr 2023 15:21:43 +0000 (15:21 +0000)
The default values are currently set to 30 seconds, use nsupdate
default (or overriden using the -t option) timeout value instead.

bin/nsupdate/nsupdate.c

index 7a092a3c33f3a5b150c4758c00c51c17bdc7394c..c4f16ae03a699f549de49df658d2549c20d44889 100644 (file)
@@ -3501,6 +3501,8 @@ getinput(void *arg) {
 
 int
 main(int argc, char **argv) {
+       uint32_t timeoutms;
+
        style = &dns_master_style_debug;
 
        input = stdin;
@@ -3523,6 +3525,10 @@ main(int argc, char **argv) {
 
        parse_args(argc, argv);
 
+       /* Set the network manager timeouts in milliseconds. */
+       timeoutms = timeout * 1000;
+       isc_nm_settimeouts(netmgr, timeoutms, timeoutms, timeoutms, timeoutms);
+
        setup_system();
 
        isc_loopmgr_setup(loopmgr, getinput, NULL);