diff options
author | 2009-09-02 19:07:12 +0000 | |
---|---|---|
committer | 2009-09-02 19:07:12 +0000 | |
commit | ed32e8039c8b6971465c1b963533a5e9ebaea298 (patch) | |
tree | c8110a58df5995906434d86e9b868b4ad1ea2b24 /lib/libc | |
parent | check if we have access to the vnode before checking if we can write to (diff) | |
download | wireguard-openbsd-ed32e8039c8b6971465c1b963533a5e9ebaea298.tar.xz wireguard-openbsd-ed32e8039c8b6971465c1b963533a5e9ebaea298.zip |
make getaddrinfo(3) accept numeric servname when ai_socktype is not
specified in hint or hints is NULL.
claudio@ ok
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/net/getaddrinfo.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index 2b96ea23806..98e247bc441 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getaddrinfo.c,v 1.69 2009/06/04 21:38:29 pyr Exp $ */ +/* $OpenBSD: getaddrinfo.c,v 1.70 2009/09/02 19:07:12 fgsch Exp $ */ /* $KAME: getaddrinfo.c,v 1.31 2000/08/31 17:36:43 itojun Exp $ */ /* @@ -827,10 +827,8 @@ get_port(struct addrinfo *ai, const char *servname, int matchonly) return EAI_SERVICE; case SOCK_DGRAM: case SOCK_STREAM: - allownumeric = 1; - break; case ANY: - allownumeric = 0; + allownumeric = 1; break; default: return EAI_SOCKTYPE; |