IPv4 numeric addresses were broken thanks to IPv6 patch
[u/mdw/putty] / winnet.c
index 2cde075..88fbae0 100644 (file)
--- a/winnet.c
+++ b/winnet.c
@@ -273,6 +273,11 @@ SockAddr sk_namelookup(char *host, char **canonicalname)
     }
     else
     {
+        /*
+         * Hack inserted to deal with problems with numeric IPs.
+         * FIXME: how will this work in IPv6?
+         */
+        ret->family = AF_INET;
        *canonicalname = host;
     }
     ret->address = ntohl(a);