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.
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,