From 315633e13e059a8065eecc39f83e8a9e05367cbd Mon Sep 17 00:00:00 2001 From: A-star-ayush Date: Tue, 18 Apr 2017 13:21:05 +0530 Subject: [PATCH] getaddrinfo now accepts shorthand ipv4 notation Signed-off-by: Adrien Destugues As required by POSIX: "If the specified address family is AF_INET or AF_UNSPEC, address strings using Internet standard dot notation as specified in inet_addr are valid." (which allows IP in a.b.c.d, a.b.c, a.b, and a forms, and also accepts the numbers in hex and octal). Fixes #3884. --- src/kits/network/netresolv/irs/getaddrinfo.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/kits/network/netresolv/irs/getaddrinfo.c b/src/kits/network/netresolv/irs/getaddrinfo.c index 8c901b1e38..fb08db57ba 100644 --- a/src/kits/network/netresolv/irs/getaddrinfo.c +++ b/src/kits/network/netresolv/irs/getaddrinfo.c @@ -801,7 +801,6 @@ explore_numeric(const struct addrinfo *pai, const char *hostname, return 0; switch (afd->a_af) { -#if 0 /*X/Open spec*/ case AF_INET: if (inet_aton(hostname, (struct in_addr *)pton) == 1) { if (pai->ai_family == afd->a_af || @@ -822,7 +821,6 @@ explore_numeric(const struct addrinfo *pai, const char *hostname, ERR(EAI_FAMILY); /*xxx*/ } break; -#endif default: if (inet_pton(afd->a_af, hostname, pton) == 1) { if (pai->ai_family == afd->a_af ||