diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2013-03-30 20:11:20 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2013-03-30 20:11:20 +0000 |
commit | 5035665281fe1e7a715b5bde26b2f7a7f3194c41 (patch) | |
tree | d6fb67d4c064e9eb3a07533b1b5921714a64b657 /lib/libc | |
parent | 1d2bb98afe727a57333ce5cdcdb81a930b726185 (diff) |
allow "0" as service name for raw sockets.
ok sthen@ bluhm@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/asr/getaddrinfo_async.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/asr/getaddrinfo_async.c b/lib/libc/asr/getaddrinfo_async.c index 4e935784f0d..742603a2ef2 100644 --- a/lib/libc/asr/getaddrinfo_async.c +++ b/lib/libc/asr/getaddrinfo_async.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getaddrinfo_async.c,v 1.12 2013/03/28 11:47:23 eric Exp $ */ +/* $OpenBSD: getaddrinfo_async.c,v 1.13 2013/03/30 20:11:19 eric Exp $ */ /* * Copyright (c) 2012 Eric Faurot <eric@openbsd.org> * @@ -170,7 +170,7 @@ getaddrinfo_async_run(struct async *as, struct async_res *ar) } if (ai->ai_socktype == SOCK_RAW && - as->as.ai.servname != NULL) { + get_port(as->as.ai.servname, NULL, 1) != 0) { ar->ar_gai_errno = EAI_SERVICE; async_set_state(as, ASR_STATE_HALT); break; |