sk_hostname_is_local(), to catch the case where we're doing something like X11
forwarding over SSH through a proxy, and we've thus disabled local lookup of
hostnames.
(I think this is what's behind the report in
<
e9a86996-5dc2-4428-9b0c-
c65693ca6351@m32g2000hsf.googlegroups.com>
in comp.security.ssh, although I'd like to know more of the circumstances.)
git-svn-id: svn://svn.tartarus.org/sgt/putty@8385
cda61777-01e9-0310-a592-
d414129be87e
int sk_hostname_is_local(char *name)
{
- return !strcmp(name, "localhost");
+ return !strcmp(name, "localhost") ||
+ !strcmp(name, "::1") ||
+ !strncmp(name, "127.", 4);
}
#define ipv4_is_loopback(addr) \
int sk_hostname_is_local(char *name)
{
- return !strcmp(name, "localhost");
+ return !strcmp(name, "localhost") ||
+ !strcmp(name, "::1") ||
+ !strncmp(name, "127.", 4);
}
static INTERFACE_INFO local_interfaces[16];