From 0569fa0d252a45d0167a22a87dbea5a236f06a66 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 5 Dec 2022 09:21:35 +1100 Subject: [PATCH] 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. (cherry picked from commit 8caa94bdf1e9d03439670f603893133231083e16) --- bin/dig/host.c | 1 + bin/dig/nslookup.c | 1 + 2 files changed, 2 insertions(+) diff --git a/bin/dig/host.c b/bin/dig/host.c index 6debe59660..011587a5a6 100644 --- a/bin/dig/host.c +++ b/bin/dig/host.c @@ -854,6 +854,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 67ae315610..a0f508d75a 100644 --- a/bin/dig/nslookup.c +++ b/bin/dig/nslookup.c @@ -582,6 +582,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; } }