]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix delv default timeout value
authorAram Sargsyan <aram@isc.org>
Tue, 11 Mar 2025 12:24:43 +0000 (12:24 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Wed, 23 Apr 2025 17:03:05 +0000 (17:03 +0000)
The isc_nm_getinitialtimeout() function (and also the previously used
isc_nm_gettimeouts() function) returns timeout value(s) in milliseconds,
while the dns_request_create() function expects timeout values in
seconds. Fix the bug by dividing the timeout value by MS_PER_SEC.

There is no added test, because it turns out delv doesn't support
setting custom timeout values (as opposed to what is suggested in
its man page). Tests should be added later when the '+timeout=T'
option is implemented.

bin/delv/delv.c

index d7a5f477d0118636895eb0251cb0affcddce7695..eeaed8377f962147f66cc20da9090dca61df59f9 100644 (file)
@@ -2096,7 +2096,8 @@ sendquery(void *arg) {
 
        dns_view_attach(view, &(dns_view_t *){ NULL });
 
-       const unsigned int timeout = isc_nm_getinitialtimeout(netmgr);
+       const unsigned int timeout = isc_nm_getinitialtimeout(netmgr) /
+                                    MS_PER_SEC;
        CHECK(dns_request_create(requestmgr, message, NULL, &peer, NULL, NULL,
                                 DNS_REQUESTOPT_TCP, NULL, timeout, timeout, 0,
                                 0, isc_loop(), recvresponse, message,