Subject: getaddrinfo(3): shortened IPv4 literal address
To: None <tech-net@netbsd.org>
From: None <itojun@iijlab.net>
List: tech-net
Date: 04/20/2004 02:54:54
RFC2553 says: numeric host address string (i.e., a dotted-decimal
IPv4 address or an IPv6 hex address)
RFC3493 says: 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.
i really dislike the change. opinions?
itojun
Index: getaddrinfo.c
===================================================================
RCS file: /cvs/src/lib/libc/net/getaddrinfo.c,v
retrieving revision 1.49
diff -u -r1.49 getaddrinfo.c
--- getaddrinfo.c 14 Apr 2004 07:06:15 -0000 1.49
+++ getaddrinfo.c 19 Apr 2004 17:52:47 -0000
@@ -689,7 +689,6 @@
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 ||
@@ -710,7 +709,6 @@
ERR(EAI_FAMILY); /*xxx*/
}
break;
-#endif
default:
if (inet_pton(afd->a_af, hostname, pton) == 1) {
if (pai->ai_family == afd->a_af ||