]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
nsupdate: when set to 0, UDP timeout should be calculated by dns_request
authorAram Sargsyan <aram@isc.org>
Mon, 12 Dec 2022 11:36:42 +0000 (11:36 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Mon, 3 Apr 2023 15:21:43 +0000 (15:21 +0000)
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.

bin/nsupdate/nsupdate.c

index a52dfe76e827ea6595aeb4e1de18f484a2cfa669..4b48778771df2c6ec17873b2815ac96a160114f1 100644 (file)
@@ -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,