1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 09:27:59 +00:00

Disallow -4 and -6 in TOOLTYPE_NONNETWORK.

They were accepted by Unix pterm, by mistake, and then totally ignored
because nothing in pterm ever makes a network connection, so nothing
cares whether you configured it to use IPv4 or IPv6.
This commit is contained in:
Simon Tatham 2022-05-21 10:23:01 +01:00
parent 4ae8b742ab
commit 1a0d076dfb

View File

@ -749,11 +749,13 @@ int cmdline_process_param(const char *p, char *value,
if (!strcmp(p, "-4") || !strcmp(p, "-ipv4")) {
RETURN(1);
UNAVAILABLE_IN(TOOLTYPE_NONNETWORK);
SAVEABLE(1);
conf_set_int(conf, CONF_addressfamily, ADDRTYPE_IPV4);
}
if (!strcmp(p, "-6") || !strcmp(p, "-ipv6")) {
RETURN(1);
UNAVAILABLE_IN(TOOLTYPE_NONNETWORK);
SAVEABLE(1);
conf_set_int(conf, CONF_addressfamily, ADDRTYPE_IPV6);
}