From: Mark Andrews Date: Sun, 4 Dec 2022 22:21:35 +0000 (+1100) Subject: Remember that the port was set in host and nslookup X-Git-Tag: v9.19.8~19^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8caa94bdf1e9d03439670f603893133231083e16;p=thirdparty%2Fbind9.git Remember that the port was set in host and nslookup Set 'port_set = true;' so that the TCP/DOT/DOH code doesn't reset the port when making connections. --- diff --git a/bin/dig/host.c b/bin/dig/host.c index 78144f54d55..89fc278c420 100644 --- a/bin/dig/host.c +++ b/bin/dig/host.c @@ -848,6 +848,7 @@ parse_args(bool is_batchfile, int argc, char **argv) { break; case 'p': port = atoi(isc_commandline_argument); + port_set = true; break; } } diff --git a/bin/dig/nslookup.c b/bin/dig/nslookup.c index 5896055c3f0..916aa4ce3c4 100644 --- a/bin/dig/nslookup.c +++ b/bin/dig/nslookup.c @@ -569,6 +569,7 @@ set_port(const char *value) { isc_result_t result = parse_uint(&n, value, 65535, "port"); if (result == ISC_R_SUCCESS) { port = (uint16_t)n; + port_set = true; } }