Differences From Artifact [cf1b2b2275]:
- File ssh.c — part of check-in [7c4cad97cb] at 2014-01-25 09:58:54 on branch trunk — Use the new host_str* functions to improve IPv6 literal support. I've gone through everywhere we handle host names / addresses (on command lines, in PuTTY config, in port forwarding, in X display names, in host key storage...) and tried to make them handle IPv6 literals sensibly, by using the host_str* functions I introduced in my previous commit. Generally it's now OK to use a bracketed IPv6 literal anywhere a hostname might have been valid; in a few cases where no ambiguity exists (e.g. no :port suffix is permitted anyway) unbracketed IPv6 literals are also acceptable. (user: simon size: 343615)
To Artifact [9f0a2cc2a2]:
- File ssh.c — part of check-in [dac07879fa] at 2014-01-25 09:58:57 on branch trunk — Avoid misidentifying unbracketed IPv6 literals as host:port. Both GUI PuTTY front ends have a piece of logic whereby a string is interpreted as host:port if there's _one_ colon in it, but if there's more than one colon then it's assumed to be an IPv6 literal with no trailing port number. This permits the PuTTY command line to take strings such as 'host', 'host:22' or '[::1]:22', but also cope with a bare v6 literal such as '::1'. This logic is also required in the two Plink front ends and in the processing of CONF_loghost for host key indexing in ssh.c, but was missing in all those places. Add it. (user: simon size: 343754)
| ︙ | |||
3415 3416 3417 3418 3419 3420 3421 | 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 | - + + - + |
char *colon;
tmphost = dupstr(loghost);
ssh->savedport = 22; /* default ssh port */
/*
* A colon suffix on the hostname string also lets us affect
|
| ︙ |