]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remember that the port was set in host and nslookup
authorMark Andrews <marka@isc.org>
Sun, 4 Dec 2022 22:21:35 +0000 (09:21 +1100)
committerMark Andrews <marka@isc.org>
Mon, 5 Dec 2022 21:58:58 +0000 (08:58 +1100)
Set 'port_set = true;' so that the TCP/DOT/DOH code doesn't reset
the port when making connections.

bin/dig/host.c
bin/dig/nslookup.c

index 78144f54d55250845c7292a657b02e7e25294972..89fc278c42041a4215142b86e1506167be660286 100644 (file)
@@ -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;
                }
        }
index 5896055c3f00b22defda209d8cff0115f296c275..916aa4ce3c4445761a580d8ff1906c0e1fc8d131 100644 (file)
@@ -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;
        }
 }