1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-05 13:32:48 -05:00

Integrate unfix.org's IPv6 patches up to level 10, with rather a lot

of polishing to bring them to what I think should in principle be
release quality. Unlike the unfix.org patches themselves, this
checkin enables IPv6 by default; if you want to leave it out, you
have to build with COMPAT=-DNO_IPV6.

I have tested that this compiles on Visual C 7 (so the nightlies
_should_ acquire IPv6 support without missing a beat), but since I
don't have IPv6 set up myself I haven't actually tested that it
_works_. It still seems to make correct IPv4 connections, but that's
all I've been able to verify for myself. Further testing is needed.

[originally from svn r5047]
[this svn revision also touched putty-wishlist]
This commit is contained in:
Simon Tatham
2004-12-30 16:45:11 +00:00
parent 7573f3733f
commit 6daf6faede
30 changed files with 583 additions and 309 deletions

View File

@ -542,9 +542,20 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
}
/*
* Trim a colon suffix off the hostname if it's there.
* Trim a colon suffix off the hostname if it's there. In
* order to protect IPv6 address literals against this
* treatment, we do not do this if there's _more_ than one
* colon.
*/
cfg.host[strcspn(cfg.host, ":")] = '\0';
{
char *c = strchr(cfg.host, ':');
if (c) {
char *d = strchr(c+1, ':');
if (!d)
*c = '\0';
}
}
/*
* Remove any remaining whitespace from the hostname.