summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorfgsch <fgsch@openbsd.org>2009-09-02 19:07:12 +0000
committerfgsch <fgsch@openbsd.org>2009-09-02 19:07:12 +0000
commited32e8039c8b6971465c1b963533a5e9ebaea298 (patch)
treec8110a58df5995906434d86e9b868b4ad1ea2b24 /lib/libc
parentcheck if we have access to the vnode before checking if we can write to (diff)
downloadwireguard-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.c6
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;