diff options
author | 2000-03-16 14:08:55 +0000 | |
---|---|---|
committer | 2000-03-16 14:08:55 +0000 | |
commit | 6a7b5eb0f2541ec102832f30f6c61d28e195fc98 (patch) | |
tree | 2af43fd07818967ad90e5f910796013bff64a732 | |
parent | Convert to mdoc, but it's still a pretty ugly man page. (diff) | |
download | wireguard-openbsd-6a7b5eb0f2541ec102832f30f6c61d28e195fc98.tar.xz wireguard-openbsd-6a7b5eb0f2541ec102832f30f6c61d28e195fc98.zip |
workaround against name servers which return NXDOMAIN/SERVFAIL on IPv4 only
node (the srever server should return acount = 0 without error).
NetBSD PR: 9621
-rw-r--r-- | lib/libc/net/getaddrinfo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index 1038ce9d83e..8de6394a10e 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getaddrinfo.c,v 1.16 2000/03/13 12:26:56 itojun Exp $ */ +/* $OpenBSD: getaddrinfo.c,v 1.17 2000/03/16 14:08:55 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -1545,6 +1545,7 @@ res_queryN(name, target) return (n); } n = res_send(buf, n, answer, anslen); +#if 0 if (n < 0) { #ifdef DEBUG if (_res.options & RES_DEBUG) @@ -1553,8 +1554,9 @@ res_queryN(name, target) h_errno = TRY_AGAIN; return (n); } +#endif - if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { + if (n < 0 || hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { rcode = hp->rcode; /* record most recent error */ #ifdef DEBUG if (_res.options & RES_DEBUG) |