On Wed, Dec 16, 2015 at 06:08:22PM -0500, Ted Unangst wrote:
> 
> well, nobody fixed it, so if it's working, it's not using getaddrinfo.
> 

Hmmm... looks like getaddrinfo was using my nameserver to resolve the
decimal IP? I get the same behavior in -current by passing the
AI_NUMERICHOST flag in hints. The following patch should fix this issue:

Index: asr_utils.c
===================================================================
RCS file: /cvs/src/lib/libc/asr/asr_utils.c,v
retrieving revision 1.13
diff -u -p -r1.13 asr_utils.c
--- asr_utils.c 9 Sep 2015 15:49:34 -0000       1.13
+++ asr_utils.c 17 Dec 2015 15:53:12 -0000
@@ -431,7 +431,7 @@ _asr_sockaddr_from_str(struct sockaddr *
                return _asr_sockaddr_from_str(sa, PF_INET6, str);
 
        case PF_INET:
-               if (inet_pton(PF_INET, str, &ina) != 1)
+               if (inet_aton(str, &ina) != 1)
                        return (-1);
 
                sin = (struct sockaddr_in *)sa;

Reply via email to