diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2003-03-17 23:16:37 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2003-03-17 23:16:37 +0000 |
commit | d5316210dc9e14015fa84f0358d2e1296776dc0a (patch) | |
tree | 12737a48de64da25d4330ff7ec52c2aab896d968 /lib/libc/net/getaddrinfo.c | |
parent | 4bd25e708cc1a39ad0f3d7f0dfbb62500ad878e2 (diff) |
If hostname != NULL, hostname is not a numeric string, and AI_NUMERICHOST
is set, return EAI_NONAME like RFC2553 specifies. millert/itojun ok.
Diffstat (limited to 'lib/libc/net/getaddrinfo.c')
-rw-r--r-- | lib/libc/net/getaddrinfo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index 241c5b17aee..490b9861ae5 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getaddrinfo.c,v 1.45 2003/03/04 00:29:17 itojun Exp $ */ +/* $OpenBSD: getaddrinfo.c,v 1.46 2003/03/17 23:16:36 jason Exp $ */ /* $KAME: getaddrinfo.c,v 1.31 2000/08/31 17:36:43 itojun Exp $ */ /* @@ -435,10 +435,10 @@ getaddrinfo(hostname, servname, hints, res) if (sentinel.ai_next) goto good; - if (pai->ai_flags & AI_NUMERICHOST) - ERR(EAI_NODATA); if (hostname == NULL) ERR(EAI_NODATA); + if (pai->ai_flags & AI_NUMERICHOST) + ERR(EAI_NONAME); /* * hostname as alphabetical name. |