Add some hard-coded textual literal-IP representations of localhost to
[u/mdw/putty] / windows / winnet.c
index 3848916..c549b08 100644 (file)
@@ -602,7 +602,9 @@ void sk_getaddr(SockAddr addr, char *buf, int buflen)
 
 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];