mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -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:
10
proxy.c
10
proxy.c
@ -342,7 +342,7 @@ static int proxy_for_destination (SockAddr addr, char *hostname, int port,
|
||||
}
|
||||
|
||||
SockAddr name_lookup(char *host, int port, char **canonicalname,
|
||||
const Config *cfg)
|
||||
const Config *cfg, int addressfamily)
|
||||
{
|
||||
if (cfg->proxy_type != PROXY_NONE &&
|
||||
do_proxy_dns(cfg) &&
|
||||
@ -351,7 +351,7 @@ SockAddr name_lookup(char *host, int port, char **canonicalname,
|
||||
return sk_nonamelookup(host);
|
||||
}
|
||||
|
||||
return sk_namelookup(host, canonicalname);
|
||||
return sk_namelookup(host, canonicalname, addressfamily);
|
||||
}
|
||||
|
||||
Socket new_connection(SockAddr addr, char *hostname,
|
||||
@ -433,7 +433,7 @@ Socket new_connection(SockAddr addr, char *hostname,
|
||||
|
||||
/* look-up proxy */
|
||||
proxy_addr = sk_namelookup(cfg->proxy_host,
|
||||
&proxy_canonical_name);
|
||||
&proxy_canonical_name, cfg->addressfamily);
|
||||
if (sk_addr_error(proxy_addr) != NULL) {
|
||||
ret->error = "Proxy error: Unable to resolve proxy host name";
|
||||
return (Socket)ret;
|
||||
@ -461,13 +461,13 @@ Socket new_connection(SockAddr addr, char *hostname,
|
||||
}
|
||||
|
||||
Socket new_listener(char *srcaddr, int port, Plug plug, int local_host_only,
|
||||
const Config *cfg)
|
||||
const Config *cfg, int addressfamily)
|
||||
{
|
||||
/* TODO: SOCKS (and potentially others) support inbound
|
||||
* TODO: connections via the proxy. support them.
|
||||
*/
|
||||
|
||||
return sk_newlistener(srcaddr, port, plug, local_host_only);
|
||||
return sk_newlistener(srcaddr, port, plug, local_host_only, addressfamily);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user