From: Aram Sargsyan Date: Mon, 12 Dec 2022 11:36:42 +0000 (+0000) Subject: nsupdate: when set to 0, UDP timeout should be calculated by dns_request X-Git-Tag: v9.19.12~25^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0ef11c0ccbea4db66f9edd6818a3a836f6c625f2;p=thirdparty%2Fbind9.git nsupdate: when set to 0, UDP timeout should be calculated by dns_request The manual page of nsupdate's '-u udptimeout' option states that, quote: > If zero, the interval is computed from the timeout interval and number > of UDP retries. However, nsupdate sets the UDP timeout value to UINT_MAX when it is 0, thus, not behaving as documented. Let dns_request_create() calculate the UDP timeout, if it was set to 0. --- diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index a52dfe76e82..4b48778771d 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -1243,9 +1243,6 @@ parse_args(int argc, char **argv) { isc_commandline_argument); exit(1); } - if (udp_timeout == 0) { - udp_timeout = UINT_MAX; - } break; case 'r': result = isc_parse_uint32(&udp_retries,